C# Class Indiefreaks.Xna.Threading.SpinLock

A struct which implements a spin lock.
Afficher le fichier Open project: Indiefreaks/igf

Méthodes publiques

Méthode Description
Enter ( ) : void

Enters the lock. The calling thread will spin wait until it gains ownership of the lock.

Exit ( ) : void

Exits the lock. This allows other threads to take ownership of the lock.

TryEnter ( ) : bool

Tries to enter the lock.

TryEnter ( System.TimeSpan timeout ) : bool

Tries to enter the lock. Fails after the specified time has elapsed without aquiring the lock.

Method Details

Enter() public méthode

Enters the lock. The calling thread will spin wait until it gains ownership of the lock.
public Enter ( ) : void
Résultat void

Exit() public méthode

Exits the lock. This allows other threads to take ownership of the lock.
public Exit ( ) : void
Résultat void

TryEnter() public méthode

Tries to enter the lock.
public TryEnter ( ) : bool
Résultat bool

TryEnter() public méthode

Tries to enter the lock. Fails after the specified time has elapsed without aquiring the lock.
public TryEnter ( System.TimeSpan timeout ) : bool
timeout System.TimeSpan The timeout.
Résultat bool