C# 클래스 BEPUutilities.SpinLock

Synchronizes using a busy wait. Take care when using this; if the critical section is long or there's any doubt about the use of a busy wait, consider using Monitor locks or other approaches instead. Replaces the .NET SpinLock on PC and provides its functionality on the Xbox360.
파일 보기 프로젝트 열기: Indiefreaks/igf

공개 메소드들

메소드 설명
Enter ( ) : void

Enters the critical section. A thread cannot attempt to enter the spinlock if it already owns the spinlock.

Exit ( ) : void

Exits the critical section. This can only be safely called from the same thread of execution after a corresponding Enter.

TryEnter ( ) : bool

Attempts to enters the critical section. A thread cannot attempt to enter the spinlock if it already owns the spinlock.

비공개 메소드들

메소드 설명
WaitBriefly ( int &attempt ) : void

메소드 상세

Enter() 공개 메소드

Enters the critical section. A thread cannot attempt to enter the spinlock if it already owns the spinlock.
public Enter ( ) : void
리턴 void

Exit() 공개 메소드

Exits the critical section. This can only be safely called from the same thread of execution after a corresponding Enter.
public Exit ( ) : void
리턴 void

TryEnter() 공개 메소드

Attempts to enters the critical section. A thread cannot attempt to enter the spinlock if it already owns the spinlock.
public TryEnter ( ) : bool
리턴 bool