X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fthread-worker.ts;h=ec6b6a0aa65ac60adb1f089a4923894798953525;hb=895b5341fc326345504591f709cf2fda7e11257a;hp=ede0b3b5602f6335e2fc0c3409a719fd5edbf5b6;hpb=71cad0b00456d2f7cf0987604062674ff19b44c4;p=poolifier.git diff --git a/src/worker/thread-worker.ts b/src/worker/thread-worker.ts index ede0b3b5..ec6b6a0a 100644 --- a/src/worker/thread-worker.ts +++ b/src/worker/thread-worker.ts @@ -62,14 +62,12 @@ export class ThreadWorker< this.port.on('message', this.messageListener.bind(this)) this.sendToMainWorker({ ready: true, - taskFunctionNames: this.listTaskFunctionNames(), - workerId: this.id + taskFunctionNames: this.listTaskFunctionNames() }) } catch { this.sendToMainWorker({ ready: false, - taskFunctionNames: this.listTaskFunctionNames(), - workerId: this.id + taskFunctionNames: this.listTaskFunctionNames() }) } } @@ -89,7 +87,7 @@ export class ThreadWorker< /** @inheritDoc */ protected sendToMainWorker (message: MessageValue): void { - this.port.postMessage(message) + this.port.postMessage({ ...message, workerId: this.id }) } /** @inheritDoc */