This IDisposable uses the ReaderWriterLockSlim for critical sections that allow one writer and multiple reader. The counter parts are WriteLock and ReadLock. It is used to replaces try-finally blocks with "using" statements. More...
Public Member Functions | |
void | Dispose () |
Calls ReaderWriterLockSlim.ExitUpgradeableReadLock. More... | |
Static Public Member Functions | |
static IDisposable | Enter (ReaderWriterLockSlim syncObject) |
Enters a critical section with ReaderWriterLockSlim.EnterUpgradeableReadLock and returns a new instance of UpgradeableReadLock. More... | |
static IDisposable | TryEnter (ReaderWriterLockSlim syncObject, int millisecondsTimeout) |
Enters a critical section with ReaderWriterLockSlim.TryEnterUpgradeableReadLock(int) and returns a new instance of WriteLock. More... | |
This IDisposable uses the ReaderWriterLockSlim for critical sections that allow one writer and multiple reader. The counter parts are WriteLock and ReadLock. It is used to replaces try-finally blocks with "using" statements.
|
inline |
Calls ReaderWriterLockSlim.ExitUpgradeableReadLock.
|
inlinestatic |
Enters a critical section with ReaderWriterLockSlim.EnterUpgradeableReadLock and returns a new instance of UpgradeableReadLock.
syncObject | The reader writer lock. |
|
inlinestatic |
Enters a critical section with ReaderWriterLockSlim.TryEnterUpgradeableReadLock(int) and returns a new instance of WriteLock.
syncObject | The reader writer lock. |
millisecondsTimeout | The timeout for ReaderWriterLockSlim.TryEnterUpgradeableReadLock(int) in milliseconds. |
LockTimeoutException | ReaderWriterLockSlim.TryEnterUpgradeableReadLock(int) returned false. |