pub unsafe extern "C" fn nstd_timed_mutex_lock<'m, 'a>(
mutex: &'m NSTDTimedMutex<'a>,
) -> NSTDOptionalTimedMutexLockResult<'m, 'a>Available on crate feature
timed_mutex only.Expand description
Waits for a timed mutex lock to become acquired, returning a guard wrapping the protected data.
Attempting to call this function on a thread that already owns the lock will result in undefined behavior.
§Parameters:
const NSTDTimedMutex *mutex- The mutex to lock.
§Returns
NSTDOptionalTimedMutexLockResult guard - A handle to the mutex’s protected data, or an
uninitialized “none” value if the OS fails to lock the mutex.
§Safety
The mutex lock must not already be owned by the calling thread.