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.

example.js 238B

1234567891011121314
  1. 'use strict'
  2. /* eslint-disable no-var */
  3. var queue = require('./')(worker, 1)
  4. queue.push(42, function (err, result) {
  5. if (err) { throw err }
  6. console.log('the result is', result)
  7. })
  8. function worker (arg, cb) {
  9. cb(null, 42 * 2)
  10. }