Here, you have a pool of n threads. You can call
x.start(function, args, kwargs)
to start something running
(perhaps a write to a file), and then go off and compute something else
while the I/O completes. If you need to wait for completion, call
x.join()
.
|
__init__(self,
n=None)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
start(self,
tag,
fn,
args=None,
kwargs=None) |
source code
|
|
a tuple(whatever, whatever) pair from a computation or a CaughtException
|
getany(self)
Returns:
the first available answer, as a (tag, value) pair. |
source code
|
|
whatever or a CaughtException
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|