lock_mutexT_lock_mutexLockMutexLockMutexlock_mutex (Operator)
Name
lock_mutexT_lock_mutexLockMutexLockMutexlock_mutex
— Lock a mutex synchronization object.
Signature
Description
lock_mutexlock_mutexLockMutexLockMutexlock_mutex
locks the mutex given by MutexHandleMutexHandleMutexHandlemutexHandlemutex_handle
. If the
mutex is currently unlocked, it becomes locked and owned by the calling
thread, and lock_mutexlock_mutexLockMutexLockMutexlock_mutex
returns immediately. If the mutex is
already locked by another thread, the calling thread waits until the mutex
is unlocked. The kind of wait is defined by the mutex' attributes set during
creation in create_mutexcreate_mutexCreateMutexCreateMutexcreate_mutex
.
Execution Information
- Multithreading type: independent (runs in parallel even with exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Parameters
MutexHandleMutexHandleMutexHandlemutexHandlemutex_handle
(input_control) mutex →
HMutex, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
Mutex synchronization object.
Result
If the mutex handle is valid, the operator lock_mutexlock_mutexLockMutexLockMutexlock_mutex
returns 2 (
H_MSG_TRUE)
.
If necessary, an exception is raised.
Possible Predecessors
create_mutexcreate_mutexCreateMutexCreateMutexcreate_mutex
Possible Successors
unlock_mutexunlock_mutexUnlockMutexUnlockMutexunlock_mutex
See also
try_lock_mutextry_lock_mutexTryLockMutexTryLockMutextry_lock_mutex
Module
Foundation