SCons.Job.ThreadPool

Package SCons :: Module Job :: Class ThreadPool |
[hide private]
[frames] | no frames]

# Class ThreadPool

source code
This class is responsible for spawning and managing worker threads.

Instance Methods | [hide private]
__init__(self, num, stack_size) Create the request and reply queues, and 'num' worker threads. | source code
put(self, obj) Put task into request queue. | source code
get(self, block=True) Remove and return a result tuple from the results queue. | source code
preparation_failed(self, obj) | source code
cleanup(self) Shuts down the thread pool, giving each worker thread a chance to shut down gracefully. | source code

Method Details | [hide private]

### __init__(self, num, stack_size) (Constructor) | source code
Create the request and reply queues, and 'num' worker threads. One must specify the stack size of the worker threads. The stack size is specified in kilobytes.