Waits until no job with this key is running.
(key: string)
| 54 | |
| 55 | /** Waits until no job with this key is running. */ |
| 56 | async waitForKey(key: string): Promise<void> { |
| 57 | while (this.runningKeys.has(key)) { |
| 58 | await Promise.race(this.running); |
| 59 | this.throwIfFailed(); |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | /** |
| 64 | * Reports a failure of any job so far, so that the caller does not carry on with the work which is not needed anymore. |
no test coverage detected