[Stackless] Event-based scheduling
debackerl at gmail.com
Wed Feb 13 11:23:39 CET 2008
I'm new to stackless, so I apologize if this is trivial.
Is it possible to schedule microthreads based on event? For example, let's
suppose that a µthread writes data through a socket. The write will block
the µthread, but is asynchronous for the real thread. Consequently, the
async write is started, the scheduler is called, and the µthread is put on a
waiting list until its write is completed. In addition, the scheduler shall
never call back a µthread that is still blocked, and the stackless.run() may
not return while there is still blocking µthreads.
I have looked at the wsgi server sample, but the performance become so poor
on windows when the number of concurrent connection increases. In addition,
there is that strange asyncore_loop function with the pool call which scares
What I want, is a WSGI server, with one thread per CPU/core, and one µthread
per connection :)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Stackless