C# Class System.Threading.ReaderWriterLockSlim

Inheritance: IDisposable
Afficher le fichier Open project: runefs/Marvin Class Usage Examples

Private Properties

Свойство Type Description
CheckTimeout int
EnterMyLock void
EnterMyLockSpin void
ExitAndWakeUpAppropriateWaiters void
ExitMyLock void
GetReadLockDetails LockDetails
LazyCreateEvent void
ReaderWriterLockSlim System
WaitOnEvent bool

Méthodes publiques

Méthode Description
Dispose ( ) : void
EnterReadLock ( ) : void
EnterUpgradeableReadLock ( ) : void
EnterWriteLock ( ) : void
ExitReadLock ( ) : void
ExitUpgradeableReadLock ( ) : void
ExitWriteLock ( ) : void
ReaderWriterLockSlim ( LockRecursionPolicy recursionPolicy ) : System
TryEnterReadLock ( TimeSpan timeout ) : bool
TryEnterReadLock ( int millisecondsTimeout ) : bool
TryEnterUpgradeableReadLock ( TimeSpan timeout ) : bool
TryEnterUpgradeableReadLock ( int millisecondsTimeout ) : bool
TryEnterWriteLock ( TimeSpan timeout ) : bool
TryEnterWriteLock ( int millisecondsTimeout ) : bool

Private Methods

Méthode Description
CheckTimeout ( TimeSpan timeout ) : int
EnterMyLock ( ) : void
EnterMyLockSpin ( ) : void
ExitAndWakeUpAppropriateWaiters ( ) : void

Determines the appropriate events to set, leaves the locks, and sets the events.

ExitMyLock ( ) : void
GetReadLockDetails ( int threadId, bool create ) : LockDetails
LazyCreateEvent ( EventWaitHandle &waitEvent, bool makeAutoResetEvent ) : void

A routine for lazily creating a event outside the lock (so if errors happen they are outside the lock and that we don't do much work while holding a spin lock). If all goes well, reenter the lock and set 'waitEvent'

ReaderWriterLockSlim ( ) : System
WaitOnEvent ( EventWaitHandle waitEvent, uint &numWaiters, int millisecondsTimeout ) : bool

Waits on 'waitEvent' with a timeout of 'millisceondsTimeout. Before the wait 'numWaiters' is incremented and is restored before leaving this routine.

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

EnterReadLock() public méthode

public EnterReadLock ( ) : void
Résultat void

EnterUpgradeableReadLock() public méthode

public EnterUpgradeableReadLock ( ) : void
Résultat void

EnterWriteLock() public méthode

public EnterWriteLock ( ) : void
Résultat void

ExitReadLock() public méthode

public ExitReadLock ( ) : void
Résultat void

ExitUpgradeableReadLock() public méthode

public ExitUpgradeableReadLock ( ) : void
Résultat void

ExitWriteLock() public méthode

public ExitWriteLock ( ) : void
Résultat void

ReaderWriterLockSlim() public méthode

public ReaderWriterLockSlim ( LockRecursionPolicy recursionPolicy ) : System
recursionPolicy LockRecursionPolicy
Résultat System

TryEnterReadLock() public méthode

public TryEnterReadLock ( TimeSpan timeout ) : bool
timeout TimeSpan
Résultat bool

TryEnterReadLock() public méthode

public TryEnterReadLock ( int millisecondsTimeout ) : bool
millisecondsTimeout int
Résultat bool

TryEnterUpgradeableReadLock() public méthode

public TryEnterUpgradeableReadLock ( TimeSpan timeout ) : bool
timeout TimeSpan
Résultat bool

TryEnterUpgradeableReadLock() public méthode

public TryEnterUpgradeableReadLock ( int millisecondsTimeout ) : bool
millisecondsTimeout int
Résultat bool

TryEnterWriteLock() public méthode

public TryEnterWriteLock ( TimeSpan timeout ) : bool
timeout TimeSpan
Résultat bool

TryEnterWriteLock() public méthode

public TryEnterWriteLock ( int millisecondsTimeout ) : bool
millisecondsTimeout int
Résultat bool