3 ms·
fibers are lightweight threads, employing a sort of non-preemptive multitasking paradigm. it basically spawns a 'thread' that will be resumed only when the cal
by anko 13y ago
fibers are lightweight threads, employing a sort of non-preemptive multitasking paradigm. it basically spawns a 'thread' that will be resumed only when the callback has returned, which returns the data passed to the callback.
the code is here: https://github.com/luciotato/waitfor/blob/master/waitfor.js https://github.com/luciotato/waitfor/blob/master/waitfor.js, but it does require fibers.