core/io: Add wait_for_completion() to I/O dispatcher

This commit is contained in:
Pekka Enberg 2025-05-22 09:43:28 +03:00
parent eca9a5b703
commit 05df548b10
11 changed files with 88 additions and 10 deletions

View file

@ -283,6 +283,13 @@ impl limbo_core::IO for PlatformIO {
}))
}
fn wait_for_completion(&self, c: Arc<limbo_core::Completion>) -> Result<()> {
while !c.is_completed() {
self.run_once()?;
}
Ok(())
}
fn run_once(&self) -> Result<()> {
Ok(())
}