[Twisted-Python] New user questions
andrew-twisted at puzzling.org
Sun Feb 6 21:55:10 EST 2005
On Sun, Feb 06, 2005 at 06:28:57PM -0800, snacktime wrote:
> 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)
In this code, printResult will not be called in a thread.
More information about the Twisted-Python