pub struct FileAllocationLock { /* private fields */ }Expand description
d1’s file lock, which is host-wide across processes as well as across
tasks.
Defence in depth behind InProcessAllocationLock, for the configuration
d1 documents as the one where two agents can genuinely coexist: the
platform state directory is per-account, so a service-account daemon and an
interactive daemon run resolve different paths and do not contend for the
single-instance lock. They do contend here if they share a state directory.
runner_manager_platform::lock::HostLock::acquire blocks the calling
thread and its own documentation names this caller: “Async callers must wrap
it in tokio::task::spawn_blocking”. That is what this does, and the
returned HostLock lives inside the guard, because dropping it is the
release.
Implementations§
Trait Implementations§
Source§impl AllocationLock for FileAllocationLock
impl AllocationLock for FileAllocationLock
Source§impl Clone for FileAllocationLock
impl Clone for FileAllocationLock
Source§fn clone(&self) -> FileAllocationLock
fn clone(&self) -> FileAllocationLock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FileAllocationLock
impl RefUnwindSafe for FileAllocationLock
impl Send for FileAllocationLock
impl Sync for FileAllocationLock
impl Unpin for FileAllocationLock
impl UnsafeUnpin for FileAllocationLock
impl UnwindSafe for FileAllocationLock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more