repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
docs: refine benchmark README.md
[poolifier.git]
/
src
/
worker
/
thread-worker.ts
diff --git
a/src/worker/thread-worker.ts
b/src/worker/thread-worker.ts
index 6f36664b8ae1a56cebb5058d7d4c56885b5ae88f..8d30ef21a8874dcfb6802e2436a7d6033a4fa8ec 100644
(file)
--- a/
src/worker/thread-worker.ts
+++ b/
src/worker/thread-worker.ts
@@
-60,10
+60,17
@@
export class ThreadWorker<
try {
this.port = message.port
this.port.on('message', this.messageListener.bind(this))
try {
this.port = message.port
this.port.on('message', this.messageListener.bind(this))
- this.sendTaskFunctionsListToMainWorker()
- this.sendToMainWorker({ ready: true, workerId: this.id })
+ this.sendToMainWorker({
+ ready: true,
+ taskFunctions: this.listTaskFunctions(),
+ workerId: this.id
+ })
} catch {
} catch {
- this.sendToMainWorker({ ready: false, workerId: this.id })
+ this.sendToMainWorker({
+ ready: false,
+ taskFunctions: this.listTaskFunctions(),
+ workerId: this.id
+ })
}
}
}
}
}
}