We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
README.md
I'd like to propose a fix for the example code in README.md.
const RunQueue = require('run-queue'); // Setup: const queue = new RunQueue({ maxConcurrency: 1 }); const finished = []; const example = (num) => new Promise((resolve) => { setTimeout(() => { finished.push(num); resolve(); }, 5 - Math.abs(num)); }); // Adding to queue: queue.add(1, example, [-1]); for (let i = 0; i < 5; ++i) { queue.add(0, example, [i]); } // Getting results: queue.run().then(() => { console.log(finished); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I'd like to propose a fix for the example code in
README.md
.Example
The text was updated successfully, but these errors were encountered: