system_assignation/node_modules/fastq/example.js

15 lines
238 B
JavaScript
Raw Normal View History

2022-03-24 09:22:39 -04:00
'use strict'
/* eslint-disable no-var */
var queue = require('./')(worker, 1)
queue.push(42, function (err, result) {
if (err) { throw err }
console.log('the result is', result)
})
function worker (arg, cb) {
cb(null, 42 * 2)
}