repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add protected removeWorker member function (#124)
[poolifier.git]
/
src
/
pools
/
thread
/
dynamic.ts
diff --git
a/src/pools/thread/dynamic.ts
b/src/pools/thread/dynamic.ts
index 51dca2f33698aede373eb2b95871f6d0dbc5ca84..b63d14e289df735a2683413c3b019aa0b12efadb 100644
(file)
--- a/
src/pools/thread/dynamic.ts
+++ b/
src/pools/thread/dynamic.ts
@@
-54,10
+54,7
@@
export class DynamicThreadPool<
if (message.kill) {
this.sendToWorker(worker, { kill: 1 })
void this.destroyWorker(worker)
if (message.kill) {
this.sendToWorker(worker, { kill: 1 })
void this.destroyWorker(worker)
- // clean workers from data structures
- const workerIndex = this.workers.indexOf(worker)
- this.workers.splice(workerIndex, 1)
- this.tasks.delete(worker)
+ this.removeWorker(worker)
}
})
return worker
}
})
return worker