repositories
/
poolifier.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test: less strict expectation for CI
[poolifier.git]
/
src
/
pools
/
abstract-pool.ts
diff --git
a/src/pools/abstract-pool.ts
b/src/pools/abstract-pool.ts
index 56bd0348829590429dc465944fef22b9f28c4b4c..4bfc3acbc47fb80b001f54f2ab429937fa46e2a9 100644
(file)
--- a/
src/pools/abstract-pool.ts
+++ b/
src/pools/abstract-pool.ts
@@
-130,10
+130,10
@@
export abstract class AbstractPool<
/**
* Constructs a new poolifier pool.
*
/**
* Constructs a new poolifier pool.
*
- * @param minimumNumberOfWorkers - Minimum number of workers that this pool
should manage
.
+ * @param minimumNumberOfWorkers - Minimum number of workers that this pool
manages
.
* @param filePath - Path to the worker file.
* @param opts - Options for the pool.
* @param filePath - Path to the worker file.
* @param opts - Options for the pool.
- * @param maximumNumberOfWorkers - Maximum number of workers that this pool
should manage
.
+ * @param maximumNumberOfWorkers - Maximum number of workers that this pool
manages
.
*/
public constructor (
protected readonly minimumNumberOfWorkers: number,
*/
public constructor (
protected readonly minimumNumberOfWorkers: number,
@@
-191,20
+191,20
@@
export abstract class AbstractPool<
}
}
}
}
- private checkMinimumNumberOfWorkers (
n
umberOfWorkers: number): void {
- if (
n
umberOfWorkers == null) {
+ private checkMinimumNumberOfWorkers (
minimumN
umberOfWorkers: number): void {
+ if (
minimumN
umberOfWorkers == null) {
throw new Error(
'Cannot instantiate a pool without specifying the number of workers'
)
throw new Error(
'Cannot instantiate a pool without specifying the number of workers'
)
- } else if (!Number.isSafeInteger(
n
umberOfWorkers)) {
+ } else if (!Number.isSafeInteger(
minimumN
umberOfWorkers)) {
throw new TypeError(
'Cannot instantiate a pool with a non safe integer number of workers'
)
throw new TypeError(
'Cannot instantiate a pool with a non safe integer number of workers'
)
- } else if (
n
umberOfWorkers < 0) {
+ } else if (
minimumN
umberOfWorkers < 0) {
throw new RangeError(
'Cannot instantiate a pool with a negative number of workers'
)
throw new RangeError(
'Cannot instantiate a pool with a negative number of workers'
)
- } else if (this.type === PoolTypes.fixed &&
n
umberOfWorkers === 0) {
+ } else if (this.type === PoolTypes.fixed &&
minimumN
umberOfWorkers === 0) {
throw new RangeError('Cannot instantiate a fixed pool with zero worker')
}
}
throw new RangeError('Cannot instantiate a fixed pool with zero worker')
}
}