repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: cleanup default arguments handling
[poolifier.git]
/
src
/
worker
/
thread-worker.ts
diff --git
a/src/worker/thread-worker.ts
b/src/worker/thread-worker.ts
index 756550e3337d1e8ef66071dd6dd21c77a5679f45..bc143a1f914b7e7dba14b395ac456be40c59ed80 100644
(file)
--- a/
src/worker/thread-worker.ts
+++ b/
src/worker/thread-worker.ts
@@
-31,6
+31,7
@@
export class ThreadWorker<
* Message port used to communicate with the main worker.
*/
private port?: MessagePort
* Message port used to communicate with the main worker.
*/
private port?: MessagePort
+
/**
* Constructs a new poolifier thread worker.
*
/**
* Constructs a new poolifier thread worker.
*
@@
-80,7
+81,9
@@
export class ThreadWorker<
}
/** @inheritDoc */
}
/** @inheritDoc */
- protected sendToMainWorker (message: MessageValue<Response>): void {
+ protected readonly sendToMainWorker = (
+ message: MessageValue<Response>
+ ): void => {
this.port?.postMessage({ ...message, workerId: this.id })
}
this.port?.postMessage({ ...message, workerId: this.id })
}