[Stackless] Problems with removing tasklet.

Christian Tismer tismer at tismer.com
Wed Oct 9 22:54:28 CEST 2002

Jeff Senn wrote:
> Christian Tismer <tismer at tismer.com> writes:

> Actually, although I do fall back on that, but I have also implemented
> an addition to the stackless module that does the equivalent but
> much faster (i.e. basically uses the interrupt to directly call
> stackless.schedule()) Of course the interrupt only will switch when
> the atomic flag is not set.

Sorry, I should have let you speak for your own :-)

> I am finding it pretty stable -- but you definitely do have to know
> what you're doing to avoid wierdness...
> Christian Tismer <tismer at tismer.com> writes:
>>Another question: Why do you actually *want* to remove the
>>current tasklet? I consider it suspicious, if not an error,
>>when people think they want to do this.
> Well... in my case I *was* using a channel for the same reason -- but
> then there was a bug (which did get fixed :-) ) but I had removed the
> channel for testing and just used .remove and .insert to "feed" the
> tasklet.  So I guess I don't *need* to do it, but for some cases of
> simple tasklets I can save a channel...(I don't have a good feel for
> how much channels "weigh"...)

Channels are so very cheap, much cheaper than a tasklet.
They mostly serve as kind of a meeting point. Nothing fancy
happens when data is transferred. Basically, communication
is between tasjlets, but the channel is a mediator, making
this anonymous.
I'm going to use channels in many other places, also in the
soon-to-come notification stuff (tasklets will notify
someone else about certain events, using broadcast over

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