You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
526 B

import * as fastq from '../'
const queue = fastq({ hello: 'world' }, worker, 1)
queue.push(42, (err, done) => {
if (err) throw err
console.log('the result is', done)
})
queue.concurrency
queue.drain()
queue.empty = () => undefined
queue.idle()
queue.kill()
queue.killAndDrain()
queue.length
queue.pause()
queue.resume()
queue.saturated = () => undefined
queue.unshift(42, (err, done) => {
if (err) throw err
console.log('the result is', done)
})
function worker(arg: any, cb: any) {
cb(null, 42 * 2)
}