debug/example/worker.js
Tj Holowaychuk fcbf168c24 example
2012-02-01 11:52:48 -08:00

17 lines
283 B
JavaScript

var a = require('../')('worker:a')
, b = require('../')('worker:b');
function work() {
a('doing lots of uninteresting work');
setTimeout(work, Math.random() * 1000);
}
work();
function workb() {
b('doing some work');
setTimeout(workb, Math.random() * 2000);
}
workb();