[Stackless] threading.local analogue to tasklets

Arnar Birgisson arnarbi at gmail.com
Thu Jun 21 11:23:17 CEST 2007


On 6/21/07, Richard Tew <richard.m.tew at gmail.com> wrote:
> There is no atomic anymore :-)

Ah, sorry - my bad. I meant to be referring to stackless.tasklet.set_atomic:

import stackless
currentTasklet = stackless.getcurrent()
atomic = currentTasklet.set_atomic(True)
try:
    print "Executing critical section"
finally:
    currentTasklet.set_atomic(atomic)

Just wondering if it will hurt to do that if the cooperative scheduler is used.

thanks,
Arnar

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list