repositories
/
poolifier.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fce028d
)
refactor: stricter worker node constructor checks
author
Jérôme Benoit
<jerome.benoit@sap.com>
Sat, 19 Aug 2023 22:27:19 +0000
(
00:27
+0200)
committer
Jérôme Benoit
<jerome.benoit@sap.com>
Sat, 19 Aug 2023 22:27:19 +0000
(
00:27
+0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/pools/worker-node.ts
patch
|
blob
|
blame
|
history
diff --git
a/src/pools/worker-node.ts
b/src/pools/worker-node.ts
index 57628bf72c74c28d18764e8d6fed067f687e6e71..43c5de7123d0beeee5ce2602f779bc4aa2878ce3 100644
(file)
--- a/
src/pools/worker-node.ts
+++ b/
src/pools/worker-node.ts
@@
-53,9
+53,9
@@
implements IWorkerNode<Worker, Data> {
'Cannot construct a worker node without a pool maximum size'
)
}
- if (
isNaN
(poolMaxSize)) {
+ if (
!Number.isSafeInteger
(poolMaxSize)) {
throw new TypeError(
- 'Cannot construct a worker node with a
NaN pool maximum size
'
+ 'Cannot construct a worker node with a
pool maximum size that is not an integer
'
)
}
this.worker = worker