class documentation

class WorkerPool: (source)

View In Hierarchy

Manage a fixed-size collection of child processes which can run tests.

Async Method start Launch all of the workers for this pool.
Method _createLocalWorkers Create local worker protocol instances and return them.
Method _launchWorkerProcesses Spawn processes from a list of process protocols.
Instance Variable _config Configuration for the precise way in which the pool is run.
async def start(self, reactor: IReactorProcess) -> StartedWorkerPool: (source)

Launch all of the workers for this pool.

Returns
StartedWorkerPoolA started pool object that can run jobs using the workers.
def _createLocalWorkers(self, protocols: Iterable[LocalWorkerAMP], workingDirectory: FilePath[Any], logFile: TextIO) -> List[LocalWorker]: (source)

Create local worker protocol instances and return them.

Parameters
protocols:Iterable[LocalWorkerAMP]The process/protocol adapters to use for the created workers.
workingDirectory:FilePath[Any]The base path in which we should run the workers.
logFile:TextIOThe test log, for workers to write to.
Returns
List[LocalWorker]A list of quantity LocalWorker instances.
def _launchWorkerProcesses(self, spawner, protocols, arguments): (source)

Spawn processes from a list of process protocols.

Parameters
spawnerA IReactorProcess.spawnProcess implementation.
protocolsAn iterable of ProcessProtocol instances.
argumentsExtra arguments passed to the processes.

Configuration for the precise way in which the pool is run.