[Stackless] bad version in CVS
tismer at tismer.com
Mon Sep 23 23:31:27 CEST 2002
Jeff Senn wrote:
> Christian Tismer <tismer at tismer.com> writes:
>>I think it works, again.
> Hm. Are you sure?
> I'm broken again... (crashing at random places).
[code which doesn't look like ti should crash]
> But -- are you sure you want to have stackless.run remove the
> interrupted task? Suppose it is atomic and really just wants to run a
> bit to finish up? (If there was a way to insert it back at the *front*
> of runnables that would be OK too ...)
Pulling out the current tasklet isn't that bad.
You can re-insert and run it immediately by t.run() .
run() inserts if necessary, and then rotates the wheel
of tasklets to make it currrent.
The intercepting code should check whether it is
safe to stop the tasklet or if it needs to be continued.
The area of real threads hasn't been touched in depth,
yet. I'm going to work on this. There is already some
code checking for incompatible tstate values, so I
*hope* switching will simply be refused if you try to
use channels between real threads. (This should become
a nice mechanism which does the right thing, not even
between threads, but also os tasks, processors, different
But I can't tell you much because I didn't do any
testing of pre-emptive scheduling.
What I'm wondering about is how my recent changes
can influence your code. I restructured, provided
more hooks (made some stuff overridable), but this
should all work the same for you.
You don't get the crash when you don't exchange tasklets?
Do you think the order plays a role? That might indicate
that something bad happens with C stacks.
Can you please give me your platform and compiler version?
It should be possible to provoke such an error without
involving a larger Tk application.
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 pager +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