Hi all,

This will probably sound like a dumb question, but I just want you guys
to confirm me something, before having coded thousand lines of stackless
(just a few hundreds for now !) :

I'm coding a bunch of "actions" methods like the following :

def  foobar_action(self,ch):
   while(1):
     m=ch.receive()
    ## Some stuff...
    ## A few lines that must be executed without being interrupted
(being atomic)
    ## Some stuff...

There is never anything blocking in these "actions" except the starting
ch.receive().
They are triggered by a "dispatcher" that triggers the right "action" by
sending to the right channel.

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 ?


thx,

Nike


_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to