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
/
cluster
/
dynamic.ts
diff --git
a/src/pools/cluster/dynamic.ts
b/src/pools/cluster/dynamic.ts
index 8b8c5185772dbea59bc0d22b2e1cb90b9383d507..c4fc788cd8dcdd0528bca2234caead2d9fc70ccd 100644
(file)
--- a/
src/pools/cluster/dynamic.ts
+++ b/
src/pools/cluster/dynamic.ts
@@
-27,7
+27,7
@@
export class DynamicClusterPool<
*/
public constructor (
min: number,
*/
public constructor (
min: number,
- pr
otected
readonly max: number,
+ pr
ivate
readonly max: number,
filePath: string,
opts: ClusterPoolOptions = {}
) {
filePath: string,
opts: ClusterPoolOptions = {}
) {
@@
-40,7
+40,12
@@
export class DynamicClusterPool<
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
- public get
busy
(): boolean {
+ public get
full
(): boolean {
return this.workers.length === this.max
}
return this.workers.length === this.max
}
+
+ /** {@inheritDoc} */
+ public get busy (): boolean {
+ return this.full && this.findFreeWorkerKey() === -1
+ }
}
}