Microtask scheduling
Isiah Meadows
isiahmeadows at gmail.com
Wed Jun 21 21:10:02 UTC 2017
It's a relatively low-level operation, but in performance-sensitive
async code and polyfills, there's still a strong need for raw
microtask scheduling, at a much lower level than promises. In
particular, there's two very frequently used modules providing a
wrapper for this specific thing:
1. next-tick: A browser polyfill for Node's `process.nextTick`, with
over 2M downloads last month and 88 direct dependents.
2. asap: A microtask scheduler that avoids blocking Node's I/O loop,
with over 7M downloads last month and 88 direct dependents.
In addition, several libraries like Bluebird have to implement their
own wrappers to gain similar functionality without assuming another
dependency.
Any chance something like Node's `process.nextTick` could be added,
maybe something like `Promise.schedule(func, thisArg, ...args)`?
-----
Isiah Meadows
me at isiahmeadows.com
Looking for web consulting? Or a new website?
Send me an email and we can get started.
www.isiahmeadows.com
More information about the es-discuss
mailing list