[Stackless] Advice on Writing a Stackless Reactor for Twisted
Christopher Armstrong
radix at twistedmatrix.com
Tue Jan 16 14:24:53 CET 2007
On 1/16/07, David Wyand <TheHeadGnome at gnometech.com> wrote:
> --- stacklessreactor.py ---
>
> __all__ = ['install']
> import sys
> import stackless
> import uthread
> from twisted.internet import selectreactor
>
> gReactor = None
>
> def ReactorTick():
> global gReactor
> while(gReactor.running != 0):
> gReactor.simulate()
> uthread.BeNice()
It doesn't look like this does anything that a simple
twisted.internet.task.LoopingCall(ReactorTick).start(0) wouldn't do.
If you used that much simpler technique, you also wouldn't restrict
yourself to the select reactor.
--
Christopher Armstrong
International Man of Twistery
http://radix.twistedmatrix.com/
http://twistedmatrix.com/
http://canonical.com/
_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless
More information about the Stackless
mailing list