MCPcopy Create free account
hub / github.com/RetypeOS/parcode / flush

Method flush

src/io.rs:90–97  ·  view source on GitHub ↗

Forces data to disk.

(&self)

Source from the content-addressed store, hash-verified

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

Callers 3

writeMethod · 0.80
write_syncMethod · 0.80
execute_graph_serialFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected