twisted._threadsView Source (View In Hierarchy)
Implements interfaces: .IWorker
|Method||statistics||Gather information on the current status of this
|Method||grow||Increase the the number of idle workers by
|Method||shrink||Decrease the number of idle workers by
|Method||do||Perform some work in a worker created by
|Method||quit||Stop doing work and shut down all idle workers.|
|Instance Variable||_createWorker||a callable that will create new workers.|
|Instance Variable||_logException||a 0-argument callable called in an exception context when there is an
unhandled error from a task passed to
|Instance Variable||_busyCount||the number of workers currently busy.|
|Instance Variable||_shouldQuitCoordinator||A flag indicating that the coordinator should be quit at the next available
|Instance Variable||_toShrink||the number of workers to shrink this
|Method||_quitIdlers||The implmentation of
|Method||_coordinateThisTask||Select a worker to dispatch to, either an idle one or a new one, and perform it.|
|Method||_recycleWorker||Called only from coordinator.|
setof idle workers.
dequeof tasks - that is, 0-argument callables passed to
Team.do- that are outstanding.
Team._quit, this flag is only set by the coordinator.
Teamby at the next available opportunity; set in the coordinator.
|createWorker||A 0-argument callable that will create an |
|logException||A 0-argument callable called in an exception context when the work passed
Increase the the number of idle workers by
|Parameters||n||The number of new idle workers to create. (type: |
The implmentation of
shrink, performed by the coordinator
Perform some work in a worker created by
|Parameters||task||the callable to run|
Select a worker to dispatch to, either an idle one or a new one, and perform it.
This method should run on the coordinator worker.
|Parameters||task||the task to dispatch (type: 0-argument callable)|
Called only from coordinator.
Recycle the given worker into the idle pool.
|Parameters||worker||a worker created by |
Stop doing work and shut down all idle workers.