[Stackless] Giving names for tasklets

Jeff Senn senn at maya.com
Tue Jun 27 20:12:47 CEST 2006

Richard Tew wrote:
> On 6/27/06, Juho Mäkinen <juho.makinen at gmail.com> wrote:
>> I also added a __del__ method to NamedTasklet in hope that it will be called
>> when the tasklet is done, without any success.
>> All additional ideas are well accepted :)
> Are you sure there isn't a reference to the tasklet somewhere?
> Is the tasklet being done, it actually being garbage collected?

Yeah... especially if you are, say, "storing all the tasklets into
a list/dictionary" or something...  ;-)

You might want to look here:


Or use Richard's idea of wrapping the function with a "finally"...

...which is probably a better idea than using __del__ (which I'm always
a bit leary of) especially given the crash/bug I posted last
week involving thread-state cleanup when running tasklets in another 
thread.  I suspicious that if you decide to put references to other 
tasklets within the tasklet object itself, you might have to run some
code that is probably not well tested...


Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list