pub struct BoardLock { /* private fields */ }Expand description
Advisory RAII guard that serializes board writes.
The lock is acquired by opening .pinto/.lock and taking an OS-level exclusive lock. Unix and
macOS use flock, while Windows uses LockFileEx; both locks are released by the kernel when
the owner process terminates. If the file is already locked, acquisition retries until the wait
limit is reached, then returns Error::Locked.
Serializing read-modify-write sequences (list/load → change → save) prevents concurrent
CLI/TUI processes from losing updates. Read-only operations do not acquire this lock.
The PID written to the file is diagnostic text only and is never used to decide ownership. This avoids incorrectly reclaiming a lock when the recorded PID has been reused by another process.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BoardLock
impl !RefUnwindSafe for BoardLock
impl Send for BoardLock
impl Sync for BoardLock
impl Unpin for BoardLock
impl UnsafeUnpin for BoardLock
impl UnwindSafe for BoardLock
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more