mirror of
https://github.com/cp6/my-idlers.git
synced 2024-11-16 23:42:32 +01:00
fd22b0bf58
V2 (Laravel re-make)
15 lines
238 B
JavaScript
Vendored
15 lines
238 B
JavaScript
Vendored
'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)
|
|
}
|