
Security News
Official Go SDK for MCP in Development, Stable Release Expected in August
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 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
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.
Security News
New research reveals that LLMs often fake understanding, passing benchmarks but failing to apply concepts or stay internally consistent.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.