C# 클래스 Opc.Ua.SafeLock

A class that allows threads to determine who, if anyone, has the lock on an object.
파일 보기 프로젝트 열기: OPCFoundation/Misc-Tools 1 사용 예제들

공개 메소드들

메소드 설명
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