[Twisted-Python] Synchronization techniques
radix at twistedmatrix.com
Fri Apr 6 12:02:27 EDT 2007
On 4/6/07, glyph at divmod.com <glyph at divmod.com> wrote:
> 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.
Thanks for putting it so succinctly. That's what I've been trying to
tell people :-) (in other media).
International Man of Twistery
More information about the Twisted-Python