You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is not possible to call process.send('complete') more than once from workers.
Is there an alternative to comunicate with the compute cluster?
For example:
simple.js
#!/usr/bin/env node
const computecluster = require('../lib/compute-cluster');
// allocate a compute cluster
var cc = new computecluster({
module: './simple_worker.js'
});
var toRun = 10;
// then you can perform work in parallel
for (var i = 0; i < toRun; i++) {
cc.enqueue({}, function(err, r) {
if (err) console.log("an error occured:", err);
else console.log("it's nice:", r);
if (--toRun === 0) cc.exit();
});
};
Is not possible to call process.send('complete') more than once from workers.
Is there an alternative to comunicate with the compute cluster?
For example:
simple.js
simple_worker.js
the output will be:
it's nice: complete 10 times
, not 20.The text was updated successfully, but these errors were encountered: