__init__(self,
callable,
args=None,
kwds=None,
requestID=None,
callback=None,
ownerObj=None)
(Constructor)
| |
A work request consists of the a callable to be executed by a worker
thread, a list of positional arguments, a dictionary of keyword
arguments.
A callback function can be specified, that is called when the results
of the request are picked up from the result queue. It must accept two
arguments, the request object and it's results in that order. If you want
to pass additional information to the callback, just stick it on the
request object.
requestID, if given, must be hashable as it is used by the ThreadPool
class to store the results of that work request in a dictionary. It
defaults to the return value of id(self).
-
|