KlassenKlassenKlassenKlassen | | | | Operatoren

try_lock_mutextry_lock_mutexTryLockMutextry_lock_mutexTryLockMutexTryLockMutex (Operator)

Name

try_lock_mutextry_lock_mutexTryLockMutextry_lock_mutexTryLockMutexTryLockMutex — Sperren eines Mutex-Synchronisationsobjektes, wenn er frei ist.

Signatur

try_lock_mutex( : : MutexHandle : Busy)

Herror try_lock_mutex(const Hlong MutexHandle, Hlong* Busy)

Herror T_try_lock_mutex(const Htuple MutexHandle, Htuple* Busy)

Herror try_lock_mutex(const HTuple& MutexHandle, Hlong* Busy)

Hlong HMutex::TryLockMutex() const

void TryLockMutex(const HTuple& MutexHandle, HTuple* Busy)

Hlong HMutex::TryLockMutex() const

void HOperatorSetX.TryLockMutex(
[in] VARIANT MutexHandle, [out] VARIANT* Busy)

Hlong HMutexX.TryLockMutex()

static void HOperatorSet.TryLockMutex(HTuple mutexHandle, out HTuple busy)

int HMutex.TryLockMutex()

Beschreibung

try_lock_mutextry_lock_mutexTryLockMutextry_lock_mutexTryLockMutexTryLockMutex verhält sich identisch zu lock_mutexlock_mutexLockMutexlock_mutexLockMutexLockMutex, bis auf dass der aufrufende Thread nicht blockiert, wenn der Mutex bereits gesperrt ist. Der Aufruf kommt in jedem Fall sofort zurück und enthält im Parameter BusyBusyBusyBusyBusybusy den Zustand des Mutexes vor dem Versuch ihn zu sperren. 1 bedeutet, dass der Mutex bereits gesperrt ist, 0, dass der Mutex frei war und nun durch den aufrufenden Thread gesperrt wurde.

Parallelisierung

Parameter

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

Mutex-Synchronisationsobjekt.

BusyBusyBusyBusyBusybusy (output_control)  number HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Mutex bereits gesperrt?

Ergebnis

Ist der Parameterwert korrekt, dann liefert try_lock_mutextry_lock_mutexTryLockMutextry_lock_mutexTryLockMutexTryLockMutex 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

lock_mutexlock_mutexLockMutexlock_mutexLockMutexLockMutex

Modul

Foundation


KlassenKlassenKlassenKlassen | | | | Operatoren