A simple blocking FIFO queue and flow control library using Promises, allowing consumers to process tasks with a configurable concurrency limit. Version 0.0.1 is the initial release. It provides a Queue class for push/pop operations and a QueueConsumer to start/stop task processing. Different from full-featured message queues like Bull or Kue, this is lightweight and designed for in-process task orchestration. The library is minimal but functional, suitable for simple sequential or parallel task execution in Node.js.
npm install blocking-queueNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue, pushes tasks, starts a consumer with concurrency 2, and waits for all tasks to complete.
Use an async function: start(async (task) => { ... }) or return a Promise.Ensure tasks are pushed before or concurrently with pop calls.
Call end after all pushes and ensure the consumer is started.
Use 'import Queue from 'blocking-queue'' or 'const Queue = require('blocking-queue')'.Ensure the first argument to start is a function that returns a Promise.
No dependency data recorded yet.