@nxtedition/scheduler 3.0.10 → 3.0.12

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 CHANGED
@@ -22,7 +22,9 @@ export declare class Scheduler {
22
22
  constructor(opts: SharedArrayBuffer | {
23
23
  concurrency?: number;
24
24
  });
25
- run<T, U>(fn: (opaque?: U) => Promise<T> | T, priority?: Priority, opaque?: U): Promise<T>;
26
- acquire<U>(fn: (opaque?: U) => unknown, priority?: Priority, opaque?: U): void;
25
+ run<T>(fn: () => Promise<T> | T, priority?: Priority): Promise<T>;
26
+ run<T, U>(fn: (opaque: U) => Promise<T> | T, priority: Priority, opaque: U): Promise<T>;
27
+ acquire(fn: () => unknown, priority?: Priority): void;
28
+ acquire<U>(fn: (opaque: U) => unknown, priority: Priority, opaque: U): void;
27
29
  release(): void;
28
30
  }
package/lib/index.js CHANGED
@@ -119,7 +119,8 @@ export class Scheduler {
119
119
  this.#concurrency = opts?.concurrency ?? Infinity
120
120
  }
121
121
  }
122
-
122
+
123
+
123
124
  run (
124
125
  fn ,
125
126
  priority = Scheduler.NORMAL,
@@ -143,6 +144,8 @@ export class Scheduler {
143
144
  })
144
145
  }
145
146
 
147
+
148
+
146
149
  acquire (fn , priority = Scheduler.NORMAL, opaque ) {
147
150
  const p = parsePriority(priority)
148
151
  const queue = this.#queues[p + 3]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nxtedition/scheduler",
3
- "version": "3.0.10",
3
+ "version": "3.0.12",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -28,5 +28,5 @@
28
28
  "rimraf": "^6.1.3",
29
29
  "typescript": "^5.9.3"
30
30
  },
31
- "gitHead": "b58c17cb0fdb8c6781ea35addb2c3b4348dba0d6"
31
+ "gitHead": "5c3858acb895ff6ee82b196487a9e2d9ee46f645"
32
32
  }