@nxtedition/scheduler 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.ts +1 -0
- package/lib/index.js +7 -0
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -19,7 +19,14 @@ export class Scheduler {
|
|
|
19
19
|
#normalQueue = new FixedQueue()
|
|
20
20
|
#highQueue = new FixedQueue()
|
|
21
21
|
|
|
22
|
+
get concurrency() {
|
|
23
|
+
return this.#concurrency
|
|
24
|
+
}
|
|
25
|
+
|
|
22
26
|
static makeState(concurrency = 0) {
|
|
27
|
+
if (concurrency < 0 || !Number.isInteger(concurrency)) {
|
|
28
|
+
throw new Error('Invalid concurrency')
|
|
29
|
+
}
|
|
23
30
|
const stateBuffer = new SharedArrayBuffer(64)
|
|
24
31
|
const stateView = new Uint32Array(stateBuffer)
|
|
25
32
|
Atomics.store(stateView, Scheduler.#CONCURRENCY_INDEX, concurrency ?? 0)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nxtedition/scheduler",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"rimraf": "^6.1.2",
|
|
21
21
|
"typescript": "^5.9.3"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "68ef78988067239d47c2d01df4e54feaedf0afa1"
|
|
24
24
|
}
|