[Stackless] Crash with .run in another Thread

Christian Tismer tismer at stackless.com
Sat Nov 4 12:00:05 CET 2006


Jeff Senn wrote:
> While playing with Brian's example I discovered an
> example that crashes on OS-X/Stackless-2.5...
> 
> I haven't looked carefully yet at the reason...
> 
> ------
> from threading import Thread
> import stackless
> 
> def remove_task(x): x.remove()
> 
> def task():
>    stackless.tasklet(remove_task)(stackless.getcurrent())
>    stackless.schedule()
> 
> class myThread(Thread):
>    def run(self):
>      stackless.tasklet(task)()
>      stackless.run(10000)
> 
> myThread().start()

Yes, there is a bug.
First you try to use run() although you are not main.
Then I fail with this:

Assertion failed: self != ts->st.current, file 
\pythondev\stackless\Python-2.4.3\dev\Stackless\module\taskletobject.c, 
line 83

Will look into this. Thanks!
The threading stuff was not much used and is for sure still buggy
or not enough developed.

ciao - chris
-- 
Christian Tismer             :^)   <mailto:tismer at stackless.com>
tismerysoft GmbH             :     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 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
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 stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list