[Stackless] Event-based scheduling

Andrew Francis andrewfr_ice at yahoo.com
Wed Feb 13 16:55:58 CET 2008

Hi Laurent:

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

The problem actually is *not* trivial because
Stackless blocks on synchronous calls.

I believe someone wrote a WSGI based server that works
with Stackless.

Look at Richard Tew's MUD example to see how to work
with asyncore.

There are quite a few examples using the
StacklessSocket module.

Myself, I use Twisted to make tasklets do network I/O.
If you are working with protocols like HTTP, consider
using Twisted.

Look at Christoper Armstrong's blockOn example:


Also look in the Stackless Google repository for more



Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping

More information about the Stackless mailing list