Home | Trees | Index | Help |
|
---|
Module threadpool :: Class ThreadPool |
|
A thread pool, distributing work requests and collecting results.
See the module doctring for more information.
Method Summary | |
---|---|
Set up the thread pool and start num_workers worker threads. | |
Add num_workers worker threads to the pool. | |
Tell num_workers worker threads to quit after their current task. | |
Process any new results in the queue. | |
Put work request into work queue and save its id for later. | |
Wait for results, blocking until all have arrived. |
Method Details |
---|
__init__(self,
num_workers,
q_size=0)
|
createWorkers(self, num_workers)Add num_workers worker threads to the pool. |
dismissWorkers(self, num_workers)Tell num_workers worker threads to quit after their current task. |
poll(self, block=False)Process any new results in the queue. |
putRequest(self, request, block=True, timeout=0)Put work request into work queue and save its id for later. |
wait(self)Wait for results, blocking until all have arrived. |
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Jun 23 13:37:22 2006 | http://epydoc.sf.net |