class documentation

class PoolHelper: (source)

View In Hierarchy

A PoolHelper constructs a threadpool.ThreadPool that doesn't actually use threads, by using the internal interfaces in twisted._threads.

Method __init__ Create a PoolHelper.
Method performAllCoordination Perform all currently scheduled "coordination", which is the work involved in delegating work to other threads.
Instance Variable performCoordination a 0-argument callable that will perform one unit of "coordination" - work involved in delegating work to other threads - and return True if it did any work, False otherwise.
Instance Variable threadpool a modified threadpool.ThreadPool to test.
Instance Variable workers the workers which represent the threads within the pool - the workers other than the coordinator.
def __init__(self, testCase, *args, **kwargs): (source)

Create a PoolHelper.

Parameters
testCasea test case attached to this helper.
*args:The arguments passed to a threadpool.ThreadPool.Undocumented
**kwargs:The arguments passed to a threadpool.ThreadPoolUndocumented
def performAllCoordination(self): (source)

Perform all currently scheduled "coordination", which is the work involved in delegating work to other threads.

performCoordination = (source)

a 0-argument callable that will perform one unit of "coordination" - work involved in delegating work to other threads - and return True if it did any work, False otherwise.

a modified threadpool.ThreadPool to test.

workers: list of 2-tuple of (IWorker, workPerformer) where workPerformer is a 0-argument callable like performCoordination. = (source)

the workers which represent the threads within the pool - the workers other than the coordinator.