unblock-event-loop
Unblock event loop with setImmediate
Usage
import {unblock} from 'unblock-event-loop';
const tasks = Array(1e3).fill().map(async () => {
await unblock();
// some code blocking the event loop
});
Unblock event loop with setImmediate
import {unblock} from 'unblock-event-loop';
const tasks = Array(1e3).fill().map(async () => {
await unblock();
// some code blocking the event loop
});
1
0.1.0
MIT
110 kB
13