Module Expr Str ImportFrom alias alias Import alias alias alias alias alias ImportFrom alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias alias ClassDef bases NameLoad body Assign NameStore Num FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body If Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body If UnaryOpNot BinOpMod Call NameLoad AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr orelse AugAssignAdd AttributeStore NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareEq Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Assign NameStore ListLoad Str decorator_list Expr Call AttributeLoad NameLoad attr NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Return Num decorator_list FunctionDef arguments args NameParam NameParam defaults body If NameLoad body Assign NameStore Call NameLoad Num orelse Assign NameStore Call NameLoad Num For NameStore NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Break Expr Call AttributeLoad NameLoad attr Num orelse Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad FunctionDef arguments args NameParam defaults body Pass decorator_list ClassDef bases NameLoad body Pass decorator_list Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Delete NameDel Delete NameDel Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Assign NameStore Dict Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign SubscriptStore NameLoad Index Str Call NameLoad Assign SubscriptStore NameLoad Index Str Call NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad decorator_list ClassDef bases NameLoad body Pass decorator_list Assign NameStore Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad keyword NameLoad Delete NameDel Delete NameDel Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Delete NameDel Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad NameLoad For NameStore Call NameLoad NameLoad body Expr Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Lambda arguments args NameParam NameParam defaults Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args defaults body Raise Call NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr NameLoad Lambda arguments args defaults Str Expr Call AttributeLoad NameLoad attr TryFinally body Expr Call AttributeLoad NameLoad attr NameLoad finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args defaults body Raise Call NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr TryFinally body Expr Call AttributeLoad NameLoad attr NameLoad finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad SubscriptLoad NameLoad Index Num attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str ClassDef bases NameLoad body Pass decorator_list Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Raise Call NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr NameLoad Lambda arguments args defaults NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TryFinally body Expr Call AttributeLoad NameLoad attr NameLoad finalbody Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr decorator_list Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore SubscriptLoad AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Assign SubscriptStore NameLoad Index Str Str Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Assign NameStore SubscriptLoad AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args defaults body Assign NameStore SubscriptLoad AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr attr Index Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr NameLoad SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TryFinally body Expr Call AttributeLoad NameLoad attr NameLoad finalbody Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Num Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num decorator_list Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr While UnaryOpNot Call NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Num decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Num Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr FunctionDef arguments args defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Delete AttributeDel NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr For NameStore Call NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr decorator_list For NameStore Call NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Lambda arguments args defaults NameLoad Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Num decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults vararg kwarg body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str FunctionDef arguments args defaults body Assign NameStore Call AttributeLoad NameLoad attr If CompareGtE BinOpAdd AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call NameLoad body Return NameLoad Return Call AttributeLoad NameLoad attr decorator_list Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Assign TupleStore NameStore AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr ListLoad FunctionDef arguments args defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Return SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num decorator_list Assign AttributeStore NameLoad attr Call NameLoad NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str While Call AttributeLoad NameLoad attr body Pass decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Num Num Assign NameStore Num For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Lambda arguments args defaults NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad NameLoad Num Num Assign NameStore Num For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Lambda arguments args defaults NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list
N/A N/A 
Tests for L{twisted.python.threadpool}
 __future__ division absolute_import N/A pickle time weakref gc threading twisted.python.compat _PY3 twisted.trial unittest twisted.python threadpool threadable failure context twisted._threads Team createMemoryWorker Synchronization N/A object N/A N/A failures 0 __init__ N/A N/A self N waiting N/A N/A N/A N/A self N N N/A N/A self waiting waiting N/A N/A self lock N/A N/A threading Lock N/A N/A self runs N/A N/A run N/A N/A self N/A N/A N/A N/A N/A N/A self lock acquire False N/A N/A N/A N/A N/A len N/A self runs 5 N/A N/A N/A N/A time sleep 0.0002 N/A N/A N/A N/A self lock release N/A N/A N/A self failures 1 N/A N/A N/A N/A self lock acquire N/A N/A N/A N/A self runs append None N/A N/A N/A len N/A self runs N/A self N N/A N/A N/A N/A N/A self waiting release N/A N/A N/A N/A self lock release N/A N/A synchronized N/A run N/A N/A N/A N/A threadable synchronize Synchronization ThreadPoolTests N/A N/A unittest SynchronousTestCase N/A N/A 
    Test threadpools.
     getTimeout N/A N/A self N/A N/A N/A 
        Return number of seconds to wait before giving up.
         N/A 5 N/A _waitForLock N/A N/A self lock N/A N/A N/A _PY3 N/A N/A items N/A range 1000000 N/A N/A items N/A xrange 1000000 N/A i items N/A N/A N/A N/A lock acquire False N/A N/A N/A N/A N/A time sleep 1e-05 N/A N/A N/A N/A self fail A long time passed without succeeding N/A test_attributes N/A N/A self N/A N/A N/A 
        L{ThreadPool.min} and L{ThreadPool.max} are set to the values passed to
        L{ThreadPool.__init__}.
         N/A pool N/A N/A threadpool ThreadPool 12 22 N/A N/A N/A self assertEqual N/A pool min 12 N/A N/A N/A self assertEqual N/A pool max 22 N/A test_start N/A N/A self N/A N/A N/A 
        L{ThreadPool.start} creates the minimum number of threads specified.
         N/A pool N/A N/A threadpool ThreadPool 0 5 N/A N/A N/A pool start N/A N/A N/A self addCleanup N/A pool stop N/A N/A N/A self assertEqual N/A len N/A pool threads 0 N/A pool N/A N/A threadpool ThreadPool 3 10 N/A N/A N/A self assertEqual N/A len N/A pool threads 0 N/A N/A N/A pool start N/A N/A N/A self addCleanup N/A pool stop N/A N/A N/A self assertEqual N/A len N/A pool threads 3 N/A test_adjustingWhenPoolStopped N/A N/A self N/A N/A N/A 
        L{ThreadPool.adjustPoolsize} only modifies the pool size and does not
        start new workers while the pool is not running.
         N/A pool N/A N/A threadpool ThreadPool 0 5 N/A N/A N/A pool start N/A N/A N/A pool stop N/A N/A N/A pool adjustPoolsize 2 N/A N/A N/A self assertEqual N/A len N/A pool threads 0 N/A test_threadCreationArguments N/A N/A self N/A N/A N/A 
        Test that creating threads in the threadpool with application-level
        objects as arguments doesn't results in those objects never being
        freed, with the thread maintaining a reference to them as long as it
        exists.
         N/A tp N/A N/A threadpool ThreadPool 0 1 N/A N/A N/A tp start N/A N/A N/A self addCleanup N/A tp stop N/A N/A N/A self assertEqual N/A tp threads N/A worker N/A N/A arg N/A N/A N/A N/A Dumb N/A object N/A N/A N/A N/A unique N/A Dumb N/A workerRef N/A N/A weakref ref worker N/A uniqueRef N/A N/A weakref ref unique N/A N/A N/A tp callInThread worker unique N/A event N/A N/A threading Event N/A N/A N/A tp callInThread N/A event set N/A N/A N/A event wait N/A N/A self getTimeout N/A worker N/A unique N/A N/A N/A gc collect N/A N/A N/A self assertEqual N/A uniqueRef None N/A N/A N/A self assertEqual N/A workerRef None N/A test_threadCreationArgumentsCallInThreadWithCallback N/A N/A self N/A N/A N/A 
        As C{test_threadCreationArguments} above, but for
        callInThreadWithCallback.
         N/A tp N/A N/A threadpool ThreadPool 0 1 N/A N/A N/A tp start N/A N/A N/A self addCleanup N/A tp stop N/A N/A N/A self assertEqual N/A tp threads N/A N/A refdict N/A N/A onResultWait N/A N/A threading Event N/A onResultDone N/A N/A threading Event N/A resultRef N/A onResult N/A N/A success result N/A N/A N/A N/A N/A onResultWait wait N/A N/A self getTimeout N/A N/A refdict N/A workerRef N/A workerRef N/A N/A refdict N/A uniqueRef N/A uniqueRef N/A N/A N/A onResultDone set N/A N/A N/A resultRef append N/A N/A weakref ref result N/A worker N/A N/A arg test N/A N/A N/A N/A Dumb N/A Dumb N/A object N/A N/A N/A N/A unique N/A Dumb N/A onResultRef N/A N/A weakref ref onResult N/A workerRef N/A N/A weakref ref worker N/A uniqueRef N/A N/A weakref ref unique N/A N/A N/A tp callInThreadWithCallback onResult worker unique test unique N/A worker N/A unique N/A N/A N/A onResultWait set N/A N/A N/A onResultDone wait N/A N/A self getTimeout N/A N/A N/A gc collect N/A N/A N/A self assertEqual N/A uniqueRef None N/A N/A N/A self assertEqual N/A workerRef None N/A onResult N/A N/A N/A gc collect N/A N/A N/A self assertEqual N/A onResultRef None N/A N/A N/A self assertEqual N/A N/A resultRef N/A 0 None N/A test_persistence N/A N/A self N/A N/A N/A 
        Threadpools can be pickled and unpickled, which should preserve the
        number of threads and other parameters.
         N/A pool N/A N/A threadpool ThreadPool 7 20 N/A N/A N/A self assertEqual N/A pool min 7 N/A N/A N/A self assertEqual N/A pool max 20 N/A copy N/A N/A pickle loads N/A N/A pickle dumps pool N/A N/A N/A self assertEqual N/A copy min 7 N/A N/A N/A self assertEqual N/A copy max 20 N/A _threadpoolTest N/A N/A self method N/A N/A N/A 
        Test synchronization of calls made with C{method}, which should be
        one of the mechanisms of the threadpool to execute work in threads.
         N/A N 10 N/A tp N/A N/A threadpool ThreadPool N/A N/A N/A tp start N/A N/A N/A self addCleanup N/A tp stop N/A waiting N/A N/A threading Lock N/A N/A N/A waiting acquire N/A actor N/A Synchronization N waiting N/A i N/A range N N/A N/A N/A method tp actor N/A N/A N/A self _waitForLock waiting N/A N/A N/A self assertFalse N/A actor failures N/A run() re-entered %d times N/A N/A actor failures N/A test_callInThread N/A N/A self N/A N/A N/A 
        Call C{_threadpoolTest} with C{callInThread}.
         N/A N/A N/A self _threadpoolTest N/A N/A N/A tp actor N/A N/A N/A tp callInThread N/A actor run N/A test_callInThreadException N/A N/A self N/A N/A N/A 
        L{ThreadPool.callInThread} logs exceptions raised by the callable it
        is passed.
         NewError N/A Exception N/A N/A N/A raiseError N/A N/A N/A N/A N/A N/A NewError N/A N/A tp N/A N/A threadpool ThreadPool 0 1 N/A N/A N/A tp callInThread raiseError N/A N/A N/A tp start N/A N/A N/A tp stop N/A errors N/A N/A self flushLoggedErrors NewError N/A N/A N/A self assertEqual N/A len errors 1 N/A test_callInThreadWithCallback N/A N/A self N/A N/A N/A 
        L{ThreadPool.callInThreadWithCallback} calls C{onResult} with a
        two-tuple of C{(True, result)} where C{result} is the value returned
        by the callable supplied.
         N/A waiter N/A N/A threading Lock N/A N/A N/A waiter acquire N/A results N/A onResult N/A N/A success result N/A N/A N/A N/A N/A waiter release N/A N/A N/A results append success N/A N/A N/A results append result N/A N/A tp N/A N/A threadpool ThreadPool 0 1 N/A N/A N/A tp callInThreadWithCallback onResult N/A N/A N/A N/A test N/A N/A N/A tp start N/A N/A N/A N/A N/A self _waitForLock waiter N/A N/A N/A N/A tp stop N/A N/A N/A self assertTrue N/A results N/A 0 N/A N/A N/A self assertEqual N/A results N/A 1 test N/A test_callInThreadWithCallbackExceptionInCallback N/A N/A self N/A N/A N/A 
        L{ThreadPool.callInThreadWithCallback} calls C{onResult} with a
        two-tuple of C{(False, failure)} where C{failure} represents the
        exception raised by the callable supplied.
         NewError N/A Exception N/A N/A N/A raiseError N/A N/A N/A N/A N/A N/A NewError N/A N/A waiter N/A N/A threading Lock N/A N/A N/A waiter acquire N/A results N/A onResult N/A N/A success result N/A N/A N/A N/A N/A waiter release N/A N/A N/A results append success N/A N/A N/A results append result N/A N/A tp N/A N/A threadpool ThreadPool 0 1 N/A N/A N/A tp callInThreadWithCallback onResult raiseError N/A N/A N/A tp start N/A N/A N/A N/A N/A self _waitForLock waiter N/A N/A N/A N/A tp stop N/A N/A N/A self assertFalse N/A results N/A 0 N/A N/A N/A self assertTrue N/A isinstance N/A results N/A 1 N/A failure Failure N/A N/A N/A self assertTrue N/A issubclass N/A N/A results N/A 1 type NewError N/A test_callInThreadWithCallbackExceptionInOnResult N/A N/A self N/A N/A N/A 
        L{ThreadPool.callInThreadWithCallback} logs the exception raised by
        C{onResult}.
         NewError N/A Exception N/A N/A N/A N/A waiter N/A N/A threading Lock N/A N/A N/A waiter acquire N/A results N/A onResult N/A N/A success result N/A N/A N/A N/A N/A results append success N/A N/A N/A results append result N/A N/A NewError N/A N/A tp N/A N/A threadpool ThreadPool 0 1 N/A N/A N/A tp callInThreadWithCallback onResult N/A N/A N/A N/A None N/A N/A N/A tp callInThread N/A waiter release N/A N/A N/A tp start N/A N/A N/A N/A N/A self _waitForLock waiter N/A N/A N/A N/A tp stop N/A errors N/A N/A self flushLoggedErrors NewError N/A N/A N/A self assertEqual N/A len errors 1 N/A N/A N/A self assertTrue N/A results N/A 0 N/A N/A N/A self assertEqual N/A results N/A 1 None N/A test_callbackThread N/A N/A self N/A N/A N/A 
        L{ThreadPool.callInThreadWithCallback} calls the function it is
        given and the C{onResult} callback in the same thread.
         N/A threadIds N/A N/A event N/A N/A threading Event onResult N/A N/A success result N/A N/A N/A N/A N/A threadIds append N/A N/A N/A threading currentThread ident N/A N/A N/A event set N/A func N/A N/A N/A N/A N/A N/A N/A threadIds append N/A N/A N/A threading currentThread ident N/A N/A tp N/A N/A threadpool ThreadPool 0 1 N/A N/A N/A tp callInThreadWithCallback onResult func N/A N/A N/A tp start N/A N/A N/A self addCleanup N/A tp stop N/A N/A N/A event wait N/A N/A self getTimeout N/A N/A N/A self assertEqual N/A len threadIds 2 N/A N/A N/A self assertEqual N/A threadIds N/A 0 N/A threadIds N/A 1 N/A test_callbackContext N/A N/A self N/A N/A N/A 
        The context L{ThreadPool.callInThreadWithCallback} is invoked in is
        shared by the context the callable and C{onResult} callback are
        invoked in.
         N/A myctx N/A N/A N/A N/A N/A context theContextTracker currentContext contexts N/A -1 N/A N/A myctx N/A testing this must be present N/A contexts N/A N/A event N/A N/A threading Event onResult N/A N/A success result N/A N/A N/A ctx N/A N/A N/A N/A N/A context theContextTracker currentContext contexts N/A -1 N/A N/A N/A contexts append ctx N/A N/A N/A event set N/A func N/A N/A N/A N/A N/A ctx N/A N/A N/A N/A N/A context theContextTracker currentContext contexts N/A -1 N/A N/A N/A contexts append ctx N/A N/A tp N/A N/A threadpool ThreadPool 0 1 N/A N/A N/A tp callInThreadWithCallback onResult func N/A N/A N/A tp start N/A N/A N/A self addCleanup N/A tp stop N/A N/A N/A event wait N/A N/A self getTimeout N/A N/A N/A self assertEqual N/A len contexts 2 N/A N/A N/A self assertEqual myctx N/A contexts N/A 0 N/A N/A N/A self assertEqual myctx N/A contexts N/A 1 N/A test_existingWork N/A N/A self N/A N/A N/A 
        Work added to the threadpool before its start should be executed once
        the threadpool is started: this is ensured by trying to release a lock
        previously acquired.
         N/A waiter N/A N/A threading Lock N/A N/A N/A waiter acquire N/A tp N/A N/A threadpool ThreadPool 0 1 N/A N/A N/A tp callInThread N/A waiter release N/A N/A N/A tp start N/A N/A N/A N/A N/A self _waitForLock waiter N/A N/A N/A N/A tp stop N/A test_workerStateTransition N/A N/A self N/A N/A N/A 
        As the worker receives and completes work, it transitions between
        the working and waiting states.
         N/A pool N/A N/A threadpool ThreadPool 0 1 N/A N/A N/A pool start N/A N/A N/A self addCleanup N/A pool stop N/A N/A N/A self assertEqual N/A pool workers 0 N/A N/A N/A self assertEqual N/A len N/A pool waiters 0 N/A N/A N/A self assertEqual N/A len N/A pool working 0 N/A threadWorking N/A N/A threading Event N/A threadFinish N/A N/A threading Event _thread N/A N/A N/A N/A N/A N/A N/A threadWorking set N/A N/A N/A threadFinish wait 10 N/A N/A N/A N/A pool callInThread _thread N/A N/A N/A threadWorking wait 10 N/A N/A N/A self assertEqual N/A pool workers 1 N/A N/A N/A self assertEqual N/A len N/A pool waiters 0 N/A N/A N/A self assertEqual N/A len N/A pool working 1 N/A N/A N/A threadFinish set N/A N/A N/A len N/A pool waiters N/A N/A N/A N/A time sleep 0.0005 N/A N/A N/A self assertEqual N/A len N/A pool waiters 1 N/A N/A N/A self assertEqual N/A len N/A pool working 0 N/A N/A RaceConditionTests N/A N/A unittest SynchronousTestCase N/A setUp N/A N/A self N/A N/A N/A N/A self threadpool N/A N/A threadpool ThreadPool 0 10 N/A N/A self event N/A N/A threading Event N/A N/A N/A N/A self threadpool start done N/A N/A N/A N/A N/A N/A N/A N/A self threadpool stop N/A N/A self threadpool N/A N/A N/A N/A self addCleanup done N/A getTimeout N/A N/A self N/A N/A N/A 
        A reasonable number of seconds to time out.
         N/A 5 N/A test_synchronization N/A N/A self N/A N/A N/A 
        If multiple threads are waiting on an event (via blocking on something
        in a callable passed to L{threadpool.ThreadPool.callInThread}), and
        there is spare capacity in the threadpool, sending another callable
        which will cause those to un-block to
        L{threadpool.ThreadPool.callInThread} will reliably run that callable
        and un-block the blocked threads promptly.

        @note: This is not really a unit test, it is a stress-test.  You may
            need to run it with C{trial -u} to fail reliably if there is a
            problem.  It is very hard to regression-test for this particular
            bug - one where the thread pool may consider itself as having
            "enough capacity" when it really needs to spin up a new thread if
            it possibly can - in a deterministic way, since the bug can only be
            provoked by subtle race conditions.
         N/A timeout N/A N/A self getTimeout N/A N/A N/A N/A self threadpool callInThread N/A N/A self event set N/A N/A N/A N/A self event wait timeout N/A N/A N/A N/A self event clear N/A i N/A range 3 N/A N/A N/A N/A N/A self threadpool callInThread N/A N/A self event wait N/A N/A N/A N/A self threadpool callInThread N/A N/A self event set N/A N/A N/A N/A self event wait timeout N/A N/A N/A N/A N/A self event isSet N/A N/A N/A N/A N/A self event set N/A N/A N/A self fail 'set' did not run in thread; timed out waiting on 'wait'. N/A test_singleThread N/A N/A self N/A N/A N/A 
        The submission of a new job to a thread pool in response to the
        C{onResult} callback does not cause a new thread to be added to the
        thread pool.

        This requires that the thread which calls C{onResult} to have first
        marked itself as available so that when the new job is queued, that
        thread may be considered to run it.  This is desirable so that when
        only N jobs are ever being executed in the thread pool at once only
        N threads will ever be created.
         N/A N/A N/A self assertEqual N/A N/A self threadpool workers 0 N/A event N/A N/A threading Event N/A N/A N/A event clear onResult N/A N/A success counter N/A N/A N/A N/A N/A event set N/A N/A i N/A range 10 N/A N/A N/A N/A N/A self threadpool callInThreadWithCallback onResult N/A N/A N/A N/A None N/A N/A N/A event wait 10 N/A N/A N/A event clear N/A N/A N/A self assertEqual N/A N/A self threadpool workers 1 N/A N/A MemoryPool N/A N/A threadpool ThreadPool N/A N/A 
    A deterministic threadpool that uses in-memory data structures to queue
    work rather than threads to execute work.
     __init__ N/A N/A self coordinator failTest newWorker N/A args kwargs N/A N/A 
        Initialize this L{MemoryPool} with a test case.

        @param coordinator: a worker used to coordinate work in the L{Team}
            underlying this threadpool.
        @type coordinator: L{twisted._threads.IExclusiveWorker}

        @param failTest: A 1-argument callable taking an exception and raising
            a test-failure exception.
        @type failTest: 1-argument callable taking (L{Failure}) and raising
            L{unittest.FailTest}.

        @param newWorker: a 0-argument callable that produces a new
            L{twisted._threads.IWorker} provider on each invocation.
        @type newWorker: 0-argument callable returning
            L{twisted._threads.IWorker}.
         N/A N/A self _coordinator coordinator N/A N/A self _failTest failTest N/A N/A self _newWorker newWorker N/A N/A N/A N/A threadpool ThreadPool __init__ self args kwargs N/A _pool N/A N/A self currentLimit threadFactory N/A N/A N/A 
        Override testing hook to create a deterministic threadpool.

        @param currentLimit: A 1-argument callable which returns the current
            threadpool size limit.

        @param threadFactory: ignored in this invocation; a 0-argument callable
            that would produce a thread.

        @return: a L{Team} backed by the coordinator and worker passed to
            L{MemoryPool.__init__}.
         respectLimit N/A N/A N/A N/A N/A stats N/A N/A team statistics N/A N/A N/A N/A stats busyWorkerCount N/A stats idleWorkerCount N/A currentLimit N/A N/A None N/A N/A N/A self _newWorker N/A N/A team N/A Team coordinator N/A self _coordinator createWorker respectLimit logException N/A self _failTest N/A team N/A N/A PoolHelper N/A object N/A N/A 
    A L{PoolHelper} constructs a L{threadpool.ThreadPool} that doesn't actually
    use threads, by using the internal interfaces in L{twisted._threads}.

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

    @ivar workers: the workers which represent the threads within the pool -
        the workers other than the coordinator.
    @type workers: L{list} of 2-tuple of (L{IWorker}, C{workPerformer}) where
        C{workPerformer} is a 0-argument callable like C{performCoordination}.

    @ivar threadpool: a modified L{threadpool.ThreadPool} to test.
    @type threadpool: L{MemoryPool}
     __init__ N/A N/A self testCase N/A args kwargs N/A N/A 
        Create a L{PoolHelper}.

        @param testCase: a test case attached to this helper.

        @type args: The arguments passed to a L{threadpool.ThreadPool}.

        @type kwargs: The arguments passed to a L{threadpool.ThreadPool}
         N/A N/A coordinator N/A self performCoordination N/A createMemoryWorker N/A N/A self workers N/A newWorker N/A N/A N/A N/A N/A N/A N/A N/A self workers append N/A createMemoryWorker N/A N/A N/A N/A self workers N/A -1 N/A 0 N/A N/A N/A self threadpool N/A MemoryPool coordinator N/A testCase fail newWorker args kwargs N/A performAllCoordination N/A N/A self N/A N/A N/A 
        Perform all currently scheduled "coordination", which is the work
        involved in delegating work to other threads.
         N/A N/A N/A self performCoordination N/A N/A N/A N/A MemoryBackedTests N/A N/A unittest SynchronousTestCase N/A N/A 
    Tests using L{PoolHelper} to deterministically test properties of the
    threadpool implementation.
     test_workBeforeStarting N/A N/A self N/A N/A N/A 
        If a threadpool is told to do work before starting, then upon starting
        up, it will start enough workers to handle all of the enqueued work
        that it's been given.
         N/A helper N/A PoolHelper self 0 10 N/A n 5 N/A x N/A range n N/A N/A N/A N/A N/A helper threadpool callInThread N/A N/A N/A N/A None N/A N/A N/A helper performAllCoordination N/A N/A N/A self assertEqual N/A helper workers N/A N/A N/A N/A N/A helper threadpool start N/A N/A N/A helper performAllCoordination N/A N/A N/A self assertEqual N/A len N/A helper workers n N/A test_tooMuchWorkBeforeStarting N/A N/A self N/A N/A N/A 
        If the amount of work before starting exceeds the maximum number of
        threads allowed to the threadpool, only the maximum count will be
        started.
         N/A helper N/A PoolHelper self 0 10 N/A n 50 N/A x N/A range n N/A N/A N/A N/A N/A helper threadpool callInThread N/A N/A N/A N/A None N/A N/A N/A helper performAllCoordination N/A N/A N/A self assertEqual N/A helper workers N/A N/A N/A N/A N/A helper threadpool start N/A N/A N/A helper performAllCoordination N/A N/A N/A self assertEqual N/A len N/A helper workers N/A N/A helper threadpool max N/A N/A