[Stackless] How to Schedule Re: Stackless Digest, Vol 27, Issue 13

Christian Tismer tismer at stackless.com
Mon May 1 22:15:59 CEST 2006


Andrew Francis wrote:

> I do little work with UIs. So I may be talking out of
> my hat. However most UIs have an event loop or an idle
> function. I suspect a part of the solution is altering
> the event loop to call stackless.schedule() as much as
> possible if there is no IO activity. In turn, many UIs
> have callbacks. Use the callbacks to communicate via
> channels to some controller (read scheduler) that will
> wake up your tasklets and have them do useful things.
> 
> As for raw_input. I suspect there is a way to use
> asynchronous IO for this too.

I've written a big framework with wxPython and Stackless.
You are right, the key is to schedule tasklets in the
OnIdle event and to request more OnIdle events.

I can submit some sample code when I'm back in Germany

ciao - chris
-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list