Function nstd_sys::mutex::nstd_mutex_try_lock
source · #[no_mangle]
pub extern "C" fn nstd_mutex_try_lock<'m, 'a>(
mutex: &'m NSTDMutex<'a>
) -> NSTDOptionalMutexLockResult<'m, 'a>Available on crate feature
nstd_mutex only.Expand description
The non-blocking variant of nstd_mutex_lock returning an uninitialized “none” result if the
mutex is locked by another thread.
Parameters:
const NSTDMutex *mutex- The mutex to lock.
Returns
NSTDOptionalMutexLockResult guard - A handle to the mutex’s protected data.