C# Class OpenMetaverse.ReaderWriterLockSlim

Inheritance: IDisposable
Mostrar archivo Open project: Virtual-Universe/Virtual-LibOMV

Private Properties

Property Type Description
CheckTimeout int
EnterMyLock void
EnterMyLockSpin void
ExitAndWakeUpAppropriateWaiters void
ExitMyLock void
GetReadLockDetails LockDetails
LazyCreateEvent void
ReaderWriterLockSlim System
WaitOnEvent bool

Public Methods

Method Description
Dispose ( ) : void
EnterReadLock ( ) : void
EnterUpgradeableReadLock ( ) : void
EnterWriteLock ( ) : void
ExitReadLock ( ) : void
ExitUpgradeableReadLock ( ) : void
ExitWriteLock ( ) : void
TryEnterReadLock ( System.TimeSpan timeout ) : bool
TryEnterReadLock ( int millisecondsTimeout ) : bool
TryEnterUpgradeableReadLock ( System.TimeSpan timeout ) : bool
TryEnterUpgradeableReadLock ( int millisecondsTimeout ) : bool
TryEnterWriteLock ( System.TimeSpan timeout ) : bool
TryEnterWriteLock ( int millisecondsTimeout ) : bool

Private Methods

Method Description
CheckTimeout ( System.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 method

public Dispose ( ) : void
return void

EnterReadLock() public method

public EnterReadLock ( ) : void
return void

EnterUpgradeableReadLock() public method

public EnterUpgradeableReadLock ( ) : void
return void

EnterWriteLock() public method

public EnterWriteLock ( ) : void
return void

ExitReadLock() public method

public ExitReadLock ( ) : void
return void

ExitUpgradeableReadLock() public method

public ExitUpgradeableReadLock ( ) : void
return void

ExitWriteLock() public method

public ExitWriteLock ( ) : void
return void

TryEnterReadLock() public method

public TryEnterReadLock ( System.TimeSpan timeout ) : bool
timeout System.TimeSpan
return bool

TryEnterReadLock() public method

public TryEnterReadLock ( int millisecondsTimeout ) : bool
millisecondsTimeout int
return bool

TryEnterUpgradeableReadLock() public method

public TryEnterUpgradeableReadLock ( System.TimeSpan timeout ) : bool
timeout System.TimeSpan
return bool

TryEnterUpgradeableReadLock() public method

public TryEnterUpgradeableReadLock ( int millisecondsTimeout ) : bool
millisecondsTimeout int
return bool

TryEnterWriteLock() public method

public TryEnterWriteLock ( System.TimeSpan timeout ) : bool
timeout System.TimeSpan
return bool

TryEnterWriteLock() public method

public TryEnterWriteLock ( int millisecondsTimeout ) : bool
millisecondsTimeout int
return bool