
Security News
New CVE Forecasting Tool Predicts 47,000 Disclosures in 2025
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
async-fun-queue
Advanced tools
a simple queue executing async functions linearly with pause/resume
A simple queue executing async functions linearly with pause/resume
npm install async-fun-queue
The most common use case:
var queue = new AsyncQueue([1, 2, 3], function (job, done) {
collection.push(job);
// simulate async
setTimeout(function () {
done();
}, 100);
});
queue.on('jobStart', function (job) {
// job begin to run
});
queue.on('jobDone', function (job) {
// job is done
});
queue.on('end', function () {
// all jobs are done
});
queue.run();
A more complicated use case, with pause
and resume
method to controll the execution process:
var queue = new AsyncQueue([1, 2, 3], function (job, done) {
setTimeout(function () {
done();
if (job === 2) {
queue.pause();
setTimeout(function () {
queue.resume();
}, 100);
}
}, 100);
});
queue.on('pause', function () {
// queue is paused
});
queue.on('resume', function () {
// queue is resumed
});
queue.run();
FAQs
a simple queue executing async functions linearly with pause/resume
The npm package async-fun-queue receives a total of 8 weekly downloads. As such, async-fun-queue popularity was classified as not popular.
We found that async-fun-queue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.