* If there are inflight cache reads this Promise can resolve in a microtask however * if there are no inflight cache reads then we wait at least one task to allow initial * cache reads to be initiated.
()
| 86 | * cache reads to be initiated. |
| 87 | */ |
| 88 | cacheReady() { |
| 89 | return new Promise<void>((resolve) => { |
| 90 | this.listeners.push(resolve) |
| 91 | if (this.count === 0) { |
| 92 | this.noMorePendingCaches() |
| 93 | } |
| 94 | }) |
| 95 | } |
| 96 | |
| 97 | beginRead() { |
| 98 | this.count++ |
no test coverage detected