KlassenKlassenKlassenKlassen | | | | Operatoren

lock_mutexlock_mutexLockMutexlock_mutexLockMutexLockMutex (Operator)

Name

lock_mutexlock_mutexLockMutexlock_mutexLockMutexLockMutex — Sperren eines Mutex-Synchronisationsobjektes.

Signatur

lock_mutex( : : MutexHandle : )

Herror lock_mutex(const Hlong MutexHandle)

Herror T_lock_mutex(const Htuple MutexHandle)

Herror lock_mutex(const HTuple& MutexHandle)

void HMutex::LockMutex() const

void LockMutex(const HTuple& MutexHandle)

void HMutex::LockMutex() const

void HOperatorSetX.LockMutex([in] VARIANT MutexHandle)

void HMutexX.LockMutex()

static void HOperatorSet.LockMutex(HTuple mutexHandle)

void HMutex.LockMutex()

Beschreibung

lock_mutexlock_mutexLockMutexlock_mutexLockMutexLockMutex sperrt den Mutex, gegeben durch MutexHandleMutexHandleMutexHandleMutexHandleMutexHandlemutexHandle. Falls der Mutex gerade frei ist, wird er unverzüglich gesperrt und gehört dem aufrufenden Thread. lock_mutexlock_mutexLockMutexlock_mutexLockMutexLockMutex kehrt in diesem Fall sofort zurück. Falls der Mutex bereits durch einen anderen Thread gesperrt wurde, wartet der aufrufende Thread solange, bis der Mutex frei ist. Die Art, wie gewartet wird, bestimmen die Attribute des Mutex, wie sie während der Initialisierung in create_mutexcreate_mutexCreateMutexcreate_mutexCreateMutexCreateMutex gesetzt wurden.

Parallelisierung

Parameter

MutexHandleMutexHandleMutexHandleMutexHandleMutexHandlemutexHandle (input_control)  mutex HMutex, HTupleHTupleHMutex, HTupleHMutexX, VARIANTHtuple (integer) (IntPtr) (Hlong) (Hlong) (Hlong) (Hlong)

Mutex-Synchronisationsobjekt.

Ergebnis

Ist der Parameterwert korrekt, dann liefert lock_mutexlock_mutexLockMutexlock_mutexLockMutexLockMutex den Wert 2 (H_MSG_TRUE). Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.

Vorgänger

create_mutexcreate_mutexCreateMutexcreate_mutexCreateMutexCreateMutex

Nachfolger

unlock_mutexunlock_mutexUnlockMutexunlock_mutexUnlockMutexUnlockMutex

Siehe auch

try_lock_mutextry_lock_mutexTryLockMutextry_lock_mutexTryLockMutexTryLockMutex

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren