pub struct ExecLock { /* private fields */ }Expand description
The executor’s lock: the port’s recursive priority-inheriting mutex and
the two calls that take and give it. Installed once, before any second
thread can reach the executor (super::Executor::set_exec_lock), and
never changed while one can.
Implementations§
Source§impl ExecLock
impl ExecLock
Sourcepub unsafe fn new(
ctx: *mut c_void,
lock: ExecLockFn,
unlock: ExecLockFn,
) -> Option<Self>
pub unsafe fn new( ctx: *mut c_void, lock: ExecLockFn, unlock: ExecLockFn, ) -> Option<Self>
A lock over the port’s mutex at ctx, already initialised by the
caller. None for a NULL ctx.
§Safety
ctx is NULL or an initialised recursive mutex that lock / unlock
take and give, and it outlives every executor the lock is installed on.
Sourcepub unsafe fn with_thread_id(self, id: ThreadIdFn) -> Self
pub unsafe fn with_thread_id(self, id: ThreadIdFn) -> Self
This lock, with the port’s thread identity: a pass that holds it releases it around each user callback (phase-509 P9b item 2).
§Safety
id answers the calling thread’s identity, from any thread, equal on
one thread and distinct across threads that are alive together.
Trait Implementations§
impl Copy for ExecLock
impl Send for ExecLock
impl Sync for ExecLock
Auto Trait Implementations§
impl Freeze for ExecLock
impl RefUnwindSafe for ExecLock
impl Unpin for ExecLock
impl UnsafeUnpin for ExecLock
impl UnwindSafe for ExecLock
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