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

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top