Call a callable object in a separate thread and call
with the return value, or a
if the callable raises an exception.
The callable is allowed to block, but the
must not block and should perform as little work as possible.
A typical action for
onResult for a threadpool used with a
Twisted reactor would be to schedule a
to fire in the main reactor thread using
onResult is called inside the separate thread, not
inside the reactor thread.
|Parameters||onResult||a callable with the signature |
(success, result). If the
callable returns normally,
onResult is called with
(True, result) where
result is the return value
of the callable. If the callable throws an exception,
is called with
onResult may be
None, in which
case it is not called at all.
|func||callable object to be called in separate thread|
|*args||positional arguments to be passed to |
|**kwargs||keyword arguments to be passed to |