Atomic procedures

In BYOB you can define atomic and non-atomic procedures. Is that possible in Snap? Or in Snap we have only non-atomic procedures? I think I remember I could right-click somewhere and choose "atomic". But I may be wrong.

The warp block in the control palette runs commands atomically. I think the Spanish translation of the block literally translates back to English as "atomic instruction".

I had forgot about the warp block. Thanks a lot :slightly_smiling_face:

I have tested the warp block and the procedure now is more atomic than without using it. But (I guess to avoid a deadlock) when I use the warp block the procedure anyway yields, even if less often, to other scripts. Is there a way to create a real atomic procedure?

Hi Stefano, the warp block is the most atomic you'll get in Snap! for a normal user defined procedure, it's pretty much the same as it was in BYOB, it only emergency-yields if running it takes longer than half a second, then it yields every half second. This is important so the user can interact with the GUI, for example to press the red stop button in case the block takes too long, or if there is an infinite loop or recursion without at base case.

Thanks Jens