[Stackless] Event-based scheduling

Laurent Debacker debackerl at gmail.com
Wed Feb 13 11:23:39 CET 2008


Hello,

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
me.

What I want, is a WSGI server, with one thread per CPU/core, and one µthread
per connection :)

Regards,
Laurent.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20080213/69241832/attachment.htm>


More information about the Stackless mailing list