pub struct WriteAcquire<F: FileBackend> { /* private fields */ }Expand description
A Send token holding BOTH blocking-acquired write locks, with no
borrow of the env.
Returned by WriteTxn::acquire and consumed by
WriteTxn::from_acquire. Splitting the blocking acquisition
(which yields this Send token) from the cheap, non-blocking txn
assembly lets a caller (obj-py) run the acquire on a worker thread
with the Python GIL released, then build the !'static WriteTxn
after re-taking the GIL.
Holds the in-process WriteSerialGuard and the optional
cross-process WriterLock; both are Send, so this token is
Send. Generic over F only to thread the same backend type
through to WriteTxn::from_acquire; the token itself stores no
F value, so it carries a PhantomData<fn() -> F> to stay
covariant-free and Send regardless of F.
Trait Implementations§
Auto Trait Implementations§
impl<F> Freeze for WriteAcquire<F>
impl<F> RefUnwindSafe for WriteAcquire<F>
impl<F> Send for WriteAcquire<F>
impl<F> Sync for WriteAcquire<F>
impl<F> Unpin for WriteAcquire<F>
impl<F> UnsafeUnpin for WriteAcquire<F>
impl<F> UnwindSafe for WriteAcquire<F>
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