[Stackless] atomic

Richard Tew richard.m.tew at gmail.com
Wed Feb 2 06:06:28 CET 2011


On Tue, Sep 16, 2008 at 5:44 AM, Alberto Ganesh Barbati <
AlbertoBarbati at libero.it> wrote:

> Richard Tew ha scritto:
> > On Sat, Sep 13, 2008 at 2:15 PM, Nicolas Stein <n.stein at internike.com>
> wrote:
> >> Am I right in assuming that, if I never use preemptive scheduling, I
> >> never need to use "...set_atomic(True)...",
> >> to guarantee the atomicity of the middle block ?
> >
> > Yes.
> >
>
> By the way, will stackless provide context manager for atomicity to be
> used in the "with" statement? I mean, wouldn't it be good to be able to
> write:
>
>  with stackless.atomic():
>    your_code_here()
>
> ....

Same thing, possibly, for set_ignore_nesting().
>
>
Just over two years later, but I would like to note that you can now do this
using Kristjan Valur's stacklesslib.

See:


http://code.google.com/p/stacklessexamples/source/browse/trunk/libraries/stacklesslib/util.py

<http://code.google.com/p/stacklessexamples/source/browse/trunk/libraries/stacklesslib/util.py>
Cheers,
Richard.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20110202/0ff7059d/attachment.html>


More information about the Stackless mailing list