mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
state machine cacheflush
This commit is contained in:
parent
da7717edfb
commit
a85d599c65
4 changed files with 90 additions and 59 deletions
|
@ -14,6 +14,7 @@ pub trait DatabaseStorage {
|
|||
buffer: Rc<RefCell<Buffer>>,
|
||||
c: Rc<Completion>,
|
||||
) -> Result<()>;
|
||||
fn sync(&self, c: Rc<Completion>) -> Result<()>;
|
||||
}
|
||||
|
||||
#[cfg(feature = "fs")]
|
||||
|
@ -52,6 +53,10 @@ impl DatabaseStorage for FileStorage {
|
|||
self.file.pwrite(pos, buffer, c)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn sync(&self, c: Rc<Completion>) -> Result<()> {
|
||||
self.file.sync(c)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "fs")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue