[Twisted-Python] when to use callInThread?

Dfgqq Dfgqq dynamicgl at gmail.com
Sat May 7 04:49:22 EDT 2011


Hi all

   I have a function like:

def longQuery(xxx)

this function will be invoked simultaneously (it means multiple thread
environment) and this function may take a while to complete.

so my question is whether i should use reactor.callInThread to take benefit
from non blocking

or use deferred object ?

It seems that deferred object doens't use threads.

Regards

GELIN YAN
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20110507/39a010fe/attachment.htm 


More information about the Twisted-Python mailing list