3 ms·
setImmediate works with macrotasks; promises work with microtasks. These are very different. See e.g. https://github.com/YuzuJS/setImmediate#macrotasks-and-micr
by domenicd 12y ago
setImmediate works with macrotasks; promises work with microtasks. These are very different. See e.g. https://github.com/YuzuJS/setImmediate#macrotasks-and-microtasks https://github.com/YuzuJS/setImmediate#macrotasks-and-microt...
Also, note that yield/generators are entirely synchronous, and cannot be used as a scheduling mechanism of any sort.