X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fpools%2Fthread%2Ffixed.ts;h=9561cc787a2cddbcb757fa1939cdeea25888a5a0;hb=1851fed0d7a9a5f5449797b01848dd44386c1517;hp=ff427ea228533096c5fd93a3b92ce59963ca86a0;hpb=c63a35a04c190989be80f9218d97e0aca739475e;p=poolifier.git diff --git a/src/pools/thread/fixed.ts b/src/pools/thread/fixed.ts index ff427ea2..9561cc78 100644 --- a/src/pools/thread/fixed.ts +++ b/src/pools/thread/fixed.ts @@ -54,7 +54,7 @@ export class FixedThreadPool< transferList?: TransferListItem[] ): void { this.workerNodes[workerNodeKey].messageChannel?.port1.postMessage( - { ...message, workerId: this.getWorkerInfo(workerNodeKey).id }, + { ...message, workerId: this.getWorkerInfo(workerNodeKey)?.id }, transferList ) } @@ -67,7 +67,7 @@ export class FixedThreadPool< workerNode.worker.postMessage( { ready: false, - workerId: this.getWorkerInfo(workerNodeKey).id, + workerId: this.getWorkerInfo(workerNodeKey)?.id, port: port2 }, [port2]