Lines Matching refs:worker
81 const worker = fork(process.argv[1], ['child']);
82 workers[worker.pid] = worker;
84 worker.messagesReceived = [];
87 worker.on('exit', (code, signal) => {
91 if (worker.isDone || code === 0) {
97 worker.pid,
113 worker.on('message', (msg) => {
122 worker.messagesReceived.push(msg.message);
124 if (worker.messagesReceived.length === messages.length) {
126 worker.isDone = true;
128 worker.pid,
129 worker.messagesReceived.length);
138 const worker = workers[pid];
142 worker.messagesReceived.forEach((buf) => {
152 worker.pid,