`await null` to stay in the same tick?
Mark S. Miller
erights at google.com
Sun Feb 7 21:53:10 UTC 2016
On Sun, Feb 7, 2016 at 1:51 PM, Kris Kowal <kris.kowal at cixar.com> wrote:
> Await yields to the event loop unconditionally. This is useful for
> spreading CPU-bound work across multiple events. You can explicitly await
> conditionally.
>
> ```
> if (guard) { await guard; }
> ```
>
Good example, thanks.
>
> On Sun, Feb 7, 2016 at 1:39 PM /#!/JoePea <joe at trusktr.io> wrote:
>
>> I'm not sure where's the best place to ask, but if I
>>
>> ```
>> await null
>> ```
>>
>> in an async function does that guarantee that the following code will
>> execute immediately (control flow will not go anywhere else)?
>>
>> - Joe
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
--
Cheers,
--MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160207/2a14cb7c/attachment-0001.html>
More information about the es-discuss
mailing list