A FIFO queue with concurrency control for Node.js and browsers, version 7.0.2. Supports both callback and promise-based processing with configurable concurrency limits, max queue size, and soft limits. It uses eventuate for event handling. The package is stable with no recent releases, suitable for rate-limiting async tasks.
npm install concurrent-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue with concurrency limit 2, processes tasks with a 1s delay, and logs start/complete.
Use promises or upgrade to Node 10+. If using callbacks, ensure two arguments to queue().
Use promise if you need to await completion, or provide callback as second argument.
Call process() before pushing items.
Check documentation for eventuate usage.
Use 'const cq = require('concurrent-queue')' without destructuring.Increase maxSize or ensure items are processed before adding more.
Call .limit({ concurrency: N }) before enqueueing items.