[Stackless] Threads and stackless

Christian Tismer tismer at tismer.com
Thu Nov 27 18:35:32 CET 2003

Harry Kalogirou wrote:

> Hi!
>  an other question from me! I try to move the whole stackless loop in a
> new native thread. By stackless loop I mean the while
> 1:stackless.schedule(). The problem is that after some time I get
> "SystemError: bad thread state in schedule". What does that say? What is
> the "bad" thread state?

This means that you are trying to jump between real
threads. tasklets can only run in the thread that
created them.
  Unless there is a very good reason, I would not recommend to
use real threads at all, and if you must, then let the
tasklets live in the main thread and have additional threads
for stuff that you need.

This is a completely untested area so far.

ciao - chris
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  mobile +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

Stackless mailing list
Stackless at www.tismer.com

More information about the Stackless mailing list