Trait emf_core_base_rs_ffi::sys::sync_handler::SyncHandlerBinding [−][src]
pub trait SyncHandlerBinding { unsafe fn lock(&self); unsafe fn try_lock(&self) -> Bool; unsafe fn unlock(&self); }
Helper trait for using a sync handler.
Required methods
unsafe fn lock(&self)
[src]
Locks the synchronisation handler.
The calling thread is stalled until the lock can be acquired. Only one thread can hold the lock at a time.
Safety
The function crosses the ffi boundary. Direct usage of a SyncHandlerBinding may break some invariants of the sys api, if not handled with care.
unsafe fn try_lock(&self) -> Bool
[src]
Tries to lock the synchronisation handler.
The function fails if another thread already holds the lock.
Return
Bool::True on success and Bool::False otherwise.
Safety
The function crosses the ffi boundary. Direct usage of a SyncHandlerBinding may break some invariants of the sys api, if not handled with care.
unsafe fn unlock(&self)
[src]
Unlocks the synchronisation handler.
Safety
The function crosses the ffi boundary. Trying to call this function without prior locking is undefined behaviour. Direct usage of a SyncHandlerBinding may break some invariants of the sys api, if not handled with care.