worker timeout and listeners.

This commit is contained in:
Christopher Jeffrey 2016-05-05 04:52:37 -07:00
parent 3ae754722d
commit cb29feada8
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -38,7 +38,7 @@ function Workers(options) {
this.uid = 0;
this.size = options.size || Workers.CORES;
this.timeout = options.timeout || 10000;
this.timeout = options.timeout || 60000;
this.children = [];
}
@ -225,6 +225,7 @@ function Worker(id) {
this.id = id;
this.framer = new Framer();
this.parser = new Parser();
this.setMaxListeners(utils.MAX_SAFE_INTEGER);
if (bcoin.isBrowser) {
this.child = new global.Worker('/bcoin-worker.js');