Post one file's bundle. Throws immediately if the writer already failed.
(bundle: StoreBundle | KernelStoreBundle)
| 147 | |
| 148 | /** Post one file's bundle. Throws immediately if the writer already failed. */ |
| 149 | send(bundle: StoreBundle | KernelStoreBundle): void { |
| 150 | if (this.firstError) throw this.firstError; |
| 151 | if (this.exited) throw new Error('store worker already exited'); |
| 152 | this.outstanding++; |
| 153 | this.worker.postMessage({ type: 'bundle', bundle }); |
| 154 | } |
| 155 | |
| 156 | /** Backpressure: resolves once fewer than `limit` bundles are un-acked. */ |
| 157 | waitBelow(limit: number): Promise<void> { |
nothing calls this directly
no test coverage detected