wrap workers in a function scope and add a validateMessage method to HK's Env

This commit is contained in:
ansuz
2020-03-17 17:23:35 -04:00
parent 5467e1ffac
commit 019e5e708b
3 changed files with 59 additions and 55 deletions

View File

@@ -5,9 +5,7 @@ const Nacl = require('tweetnacl/nacl-fast');
// XXX npm "os" and "child_process"
// TODO if this process is using too much CPU, we can use "cluster" to add load balancing to this code
console.log('New child process', process.pid);
//console.log('New child process', process.pid);
process.on('message', function (data) {
//console.log('In process', process.pid);
//console.log(+new Date(), "Message received by subprocess");