X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fworker%2Fthread-worker.ts;h=09135afffc913dd7b983b7cbac9134bb5573b3b3;hb=646d040a3beab622286af393459777f74b1366ba;hp=7a766a958ccbb41c9b29bbe76c04890eec61604d;hpb=76aa2b0f39bd376383f2fdc79046328693719590;p=poolifier.git diff --git a/src/worker/thread-worker.ts b/src/worker/thread-worker.ts index 7a766a95..09135aff 100644 --- a/src/worker/thread-worker.ts +++ b/src/worker/thread-worker.ts @@ -46,9 +46,6 @@ export class ThreadWorker< parentPort as MessagePort, opts ) - if (!this.isMain) { - this.sendToMainWorker({ workerId: this.id, started: true }) - } } protected get id (): number { @@ -57,7 +54,11 @@ export class ThreadWorker< /** @inheritDoc */ protected sendToMainWorker (message: MessageValue): void { - console.log('sending message to main worker(thread)', message) this.getMainWorker().postMessage(message) } + + /** @inheritDoc */ + protected handleError (e: Error | string): string { + return e as string + } }