C# Класс Opc.Ua.SafeLock

A class that allows threads to determine who, if anyone, has the lock on an object.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Enter ( ) : void

Acquires the lock.

Exit ( ) : void

Releases the lock.

HasLock ( ) : bool

Checks if the current thread has acquired the lock.

TryEnter ( int timeout ) : bool

Attempts to acquire the lock.

Описание методов

Enter() публичный Метод

Acquires the lock.
Thrown if the lock state is inconsistent.
public Enter ( ) : void
Результат void

Exit() публичный Метод

Releases the lock.
Thrown if the lock state is inconsistent.
public Exit ( ) : void
Результат void

HasLock() публичный Метод

Checks if the current thread has acquired the lock.
public HasLock ( ) : bool
Результат bool

TryEnter() публичный Метод

Attempts to acquire the lock.
Thrown if the lock state is inconsistent.
public TryEnter ( int timeout ) : bool
timeout int The number of milliseconds to wait.
Результат bool