Enable async/await to work on functions that don't just return promises.
pyalot at gmail.com
Sun Feb 26 14:00:43 UTC 2017
On Sun, Feb 26, 2017 at 2:51 PM, Codefined <codefined at debenclipper.com>
> What I feel we need is some way of making an asynchronous function
> "appear" to be synchronous.
That's what co-routines are. Best practices for co-routines is usually to
have some sort of API to spawn them (like new Routine(somefunction)), to be
able to switch to them (like someroutine.switch(funargs)) and to throw
exceptions into them (like someroutine.throw(error)) as well as a way to
obtain the currently used routine (like Routine.current).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss