| Home | Trees | Indices | Help |
|
|---|
|
|
A thread pool, distributing work requests and collecting results.
See the module doctring for more information.
|
|||
|
__init__(self,
num_workers,
q_size=0) Set up the thread pool and start num_workers worker threads. |
||
|
createWorkers(self,
num_workers) Add num_workers worker threads to the pool. |
||
|
dismissWorkers(self,
num_workers) Tell num_workers worker threads to to quit when they're done. |
||
|
putRequest(self,
request) Put work request into work queue and save for later. |
||
|
poll(self,
block=False,
ownerObj=None,
joinAll=False) Process any new results in the queue. |
||
|
wait(self,
ownerObj=None,
joinAll=False) Wait for results, blocking until all have arrived. |
||
|
|||
Set up the thread pool and start num_workers worker threads. num_workers is the number of worker threads to start initialy. If q_size > 0 the size of the work request is limited and the thread pool blocks when queue is full and it tries to put more work requests in it. |
|
|
|
|
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0alpha3 on Thu Oct 18 19:37:15 2007 | http://epydoc.sourceforge.net |