Await any in-flight checkpoint and writer pause.
()
| 194 | |
| 195 | /** Await any in-flight checkpoint and writer pause. */ |
| 196 | async drain(): Promise<void> { |
| 197 | while (this.pause || this.inflight) { |
| 198 | if (this.pause) await this.pause; |
| 199 | if (this.inflight) await this.inflight; |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Phase-boundary fold: backfill the ENTIRE WAL now (off-thread, awaited). |