Call the function f using a thread from the given threadpool and return the result as a Deferred.

This function is only used by client code which is maintaining its own threadpool. To run a function in the reactor's threadpool, use deferToThread.

ParametersreactorThe reactor in whose main thread the Deferred will be invoked.
threadpoolAn object which supports the callInThreadWithCallback method of twisted.python.threadpool.ThreadPool.
fThe function to call.
*argspositional arguments to pass to f.
**kwargskeyword arguments to pass to f.
ReturnsA Deferred which fires a callback with the result of f, or an errback with a twisted.python.failure.Failure if f throws an exception.
Function onResult Undocumented
def onResult(success, result): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2020-03-20 23:54:06.