[Twisted-Python] Synchronization techniques
glyph at divmod.com
glyph at divmod.com
Fri Apr 6 05:47:44 MDT 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: </pipermail/twisted-python/attachments/20070406/375a1f94/attachment.html>
More information about the Twisted-Python
mailing list