Published
Edited
Mar 21, 2018
3 stars
Insert cell
Insert cell
PQueue = {
let module = window.module = {};
try {
await require("p-queue");
} catch (ignore) {
delete window.module;
return module.exports;
}
}
Insert cell
Insert cell
queue = new PQueue({concurrency: 4})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
let queue = new PQueue({concurrency: 4});
for (let i = 0; i < 10; ++i) {
queue.add(async () => {
await Promises.delay(500);
});
}
await queue.onIdle();
return "done";
}
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more