[Twisted-Python] Synchronization techniques

glyph at divmod.com glyph at divmod.com
Fri Apr 6 07:47:44 EDT 2007

On 11:25 am, andrewfr_ice at yahoo.com wrote:
>I execute Stackless and Twisted in their own threads.
>Otherwise when the Twisted reactor blocks, Stackless
>tasklets (read threads) that could otherwise run,
>would be blocked too.

Stackless tasklets that "want to run" ought to be running due to events 
transpiring.  One kind of event is "time passes" (reactor.callLater), 
other types of events are user interaction (like callbacks in a UI such 
as GTK) or I/O events (dataReceived, connectionLost, et. al.)

There should be no need for native threads in a Twisted+Stackless 
universe.  Even if all your tasklets constantly want to be doing work, 
they should be able to do that via a tasklet scheduler that is always 
running with a 0 callLater timeout.

Do you think this would be possible?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20070406/375a1f94/attachment.htm 

More information about the Twisted-Python mailing list