Web console: Fixed SimpleWorkerPool next worker selection logic.
@@ -65,7 +65,7 @@ export default class SimpleWorkerPool {
}
_getNextWorker() {
- return this._workers.find((w) => !w.tid);
+ return this._workers.find((w) => _.isNil(w.tid));
}
_getNextTask() {
@@ -106,7 +106,7 @@ export default class SimpleWorkerPool {
this._tasks.push({tid, data});
if (this.__dbg)
- console.log(`Pool: [name=${this._name}, queue=${this._tasks.length}]`);
+ console.log(`Pool: [name=${this._name}, tid=${tid}, queue=${this._tasks.length}]`);
this._run();
