Anything that might block might yield – so I/O and sleep. If you don't do anything that might block, then your code won't yield. What's the motivation for wanting to prevent yielding?
On Tue, Feb 3, 2015 at 10:54 AM, Ben Arthur <[email protected]> wrote: > is there a way to mark a section of code within a task to run as an atomic > unit? in other words, to prevent the scheduler from switching to a > different task within this section? > > for example, i'd like have more than one @sync task running this same > snippet of code on the same global variables: > > ``` > some_array[some_index]=some_data > some_index+=1 > ``` > > alternatively, is there a list of commands which are prone to yield that > one could then avoid in a sensitive section of code? i don't see one in > the docs... > > thanks, > > ben >
