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