async-blocking-queue
v1.0.1
Published
AsyncBlockingQueue
Downloads
422
Readme
async-blocking-queue
npm install --save async-blocking-queue
AsyncBlockingQueue
import AsyncBlockingQueue from 'async-blocking-queue';
var queue = new AsyncBlockingQueue();
// wait for next enqueue() result
queue.dequeue().then((result) => console.info(result));
setTimeout(() => {
queue.enqueue('hello world')
}, 1000);