Microthreads without Stackless?

M

Michael Hobbs

Does anyone know of an existing package that provides microthreads, other
than Stackless Python? I would like to be able to provide microthreads in
my Candygram package, but I'm not interested in Stackless (for various
reasons).

In theory, it should be fairly straightforward to do preemptive
microthreading using a combination of generators and a separate IO thread.
The IO thread would poll for pending IO events and also periodically call
thread.interrupt_main() to preempt the current generator.

The devil, however, is in the scheduler's details. I am therefore hoping
that someone else has already gone through those details and created a
package. Anyone heard of such a thing?

Thanks,
- Mike

P.S. The Candygram package is an implementation of Erlang concurrency
primitives within Python. http://candygram.sourceforge.net
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top