A promise-based, dynamic priority queue runner with concurrency limiting for Node.js. Version 2.0.1 is stable but receives only sporadic maintenance. It allows adding jobs with integer priorities, ensures that all jobs of a lower priority complete before higher priorities execute, and dynamically switches back to lower priorities if new jobs are added. Supports configurable concurrency (default 1) and custom Promise implementations. Lightweight with no runtime dependencies.
npm install run-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue with concurrency 2, adds jobs at priorities 0 and 1, runs them, and logs completion.
Be mindful of dynamic job addition; plan priorities accordingly or avoid adding lower-priority jobs while higher priorities are running.
Set `maxConcurrency` option when creating the queue.
Return a Promise from your job function instead of calling a `next` callback.
Use `new RunQueue(options)` to create the queue.
Use dynamic import: `const RunQueue = (await import('run-queue')).default;`No dependency data recorded yet.