@travetto/worker 3.3.4 → 3.4.0-rc.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/worker",
3
- "version": "3.3.4",
3
+ "version": "3.4.0-rc.0",
4
4
  "description": "Process management utilities, with a focus on inter-process communication",
5
5
  "keywords": [
6
6
  "exec",
@@ -25,7 +25,7 @@
25
25
  "directory": "module/worker"
26
26
  },
27
27
  "dependencies": {
28
- "@travetto/base": "^3.3.4",
28
+ "@travetto/base": "^3.4.0-rc.0",
29
29
  "generic-pool": "^3.9.0"
30
30
  },
31
31
  "travetto": {
@@ -13,9 +13,10 @@ export class ManualAsyncIterator<X> implements AsyncIterator<X>, AsyncIterable<X
13
13
  /**
14
14
  * Initial set of items
15
15
  */
16
- constructor(initial: Iterable<X> = []) {
16
+ constructor(initial: Iterable<X> = [], signal?: AbortSignal) {
17
17
  this.#queue.push(...initial);
18
18
  this.#size = this.#queue.length;
19
+ signal?.addEventListener('abort', () => this.close());
19
20
  }
20
21
 
21
22
  // Allow for iteration