[Twisted-Python] New user questions

snacktime snacktime at gmail.com
Sun Feb 6 21:28:57 EST 2005


I'm having some problems playing with Deferreds and I think it's due
to using threads.  In the following code, will printResult be called
in the thread?  printResult is inside the protocol handler for a
simple echo server, and when calling transport.write it doesn't seem
to write anything, and I'm wondering if it's because it's being called
inside a thread?

d = threads.deferToThread(doLongCalculation)
d.addCallback(printResult)




More information about the Twisted-Python mailing list