repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
chore: generate documentation
[poolifier.git]
/
src
/
pools
/
thread
/
fixed.ts
diff --git
a/src/pools/thread/fixed.ts
b/src/pools/thread/fixed.ts
index ac629e1fb0ff7f363be0a3fe5107f2b02748c8d8..c9145f571186a9d5783531236414aff7eadd463e 100644
(file)
--- a/
src/pools/thread/fixed.ts
+++ b/
src/pools/thread/fixed.ts
@@
-6,13
+6,8
@@
import {
} from 'node:worker_threads'
import type { MessageValue } from '../../utility-types'
import { AbstractPool } from '../abstract-pool'
} from 'node:worker_threads'
import type { MessageValue } from '../../utility-types'
import { AbstractPool } from '../abstract-pool'
-import {
- type PoolOptions,
- type PoolType,
- PoolTypes,
- type WorkerType,
- WorkerTypes
-} from '../pool'
+import { type PoolOptions, type PoolType, PoolTypes } from '../pool'
+import { type WorkerType, WorkerTypes } from '../worker'
/**
* Options for a poolifier thread pool.
/**
* Options for a poolifier thread pool.
@@
-60,7
+55,7
@@
export class FixedThreadPool<
/** @inheritDoc */
protected async destroyWorker (worker: Worker): Promise<void> {
/** @inheritDoc */
protected async destroyWorker (worker: Worker): Promise<void> {
- this.sendToWorker(worker, { kill:
1
})
+ this.sendToWorker(worker, { kill:
true, workerId: worker.threadId
})
await worker.terminate()
}
await worker.terminate()
}