mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
Added support to disallow multiple processes from opening the same database file in linux and darwin
This commit is contained in:
parent
a6369982fe
commit
9ef212edd3
9 changed files with 240 additions and 21 deletions
|
@ -8,6 +8,8 @@ use std::{
|
|||
};
|
||||
|
||||
pub trait File {
|
||||
fn lock_file(&self, exclusive: bool) -> Result<()>;
|
||||
fn unlock_file(&self) -> Result<()>;
|
||||
fn pread(&self, pos: usize, c: Rc<Completion>) -> Result<()>;
|
||||
fn pwrite(&self, pos: usize, buffer: Rc<RefCell<Buffer>>, c: Rc<WriteCompletion>)
|
||||
-> Result<()>;
|
||||
|
@ -134,3 +136,5 @@ cfg_block! {
|
|||
pub use generic::GenericIO as PlatformIO;
|
||||
}
|
||||
}
|
||||
|
||||
mod common;
|
Loading…
Add table
Add a link
Reference in a new issue