Flush waits until all operations are done and all data is written to disk.
()
| 103 | |
| 104 | // Flush waits until all operations are done and all data is written to disk. |
| 105 | func (w *TxnWriter) Flush() error { |
| 106 | // No need to call Sync here. |
| 107 | return w.Wait() |
| 108 | } |
| 109 | |
| 110 | func (w *TxnWriter) Wait() error { |
| 111 | w.wg.Wait() |