Forces data to disk.
(&self)
| 88 | |
| 89 | /// Forces data to disk. |
| 90 | pub fn flush(&self) -> Result<()> { |
| 91 | let mut state = self |
| 92 | .inner |
| 93 | .lock() |
| 94 | .map_err(|_| ParcodeError::Internal("Writer mutex poisoned".into()))?; |
| 95 | state.writer.flush()?; |
| 96 | Ok(()) |
| 97 | } |
| 98 | |
| 99 | /// Consumes the `SeqWriter` and returns the inner buffered writer. |
| 100 | /// This allows avoiding Mutex locking overhead in synchronous contexts where |
no outgoing calls
no test coverage detected