cc:ing Jeff for confirmation on that

On Tue, Feb 3, 2015 at 11:30 AM, René Donner <[email protected]> wrote:

> I remember seeing a commit by Jeff at least a year ago which made returns
> from functions sometimes yield() to allow scheduled tasks to have their
> turn more often, independent of manual calls to yield().
>
> But I cannot find any information relating to that any more - perhaps I am
> imagining things.
>
> I am also interesting in this, as yield()'s beyond my control would
> interfere with using shared mutual data.
>
>
>
> Am 03.02.2015 um 16:57 schrieb Stefan Karpinski <[email protected]>:
>
> > 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
> >
>
>

Reply via email to