Method EnterUpgradedWriteGuard
EnterUpgradedWriteGuard()
Upgrades to write access, returning a write guard whose disposal exits write mode and returns this thread to upgradeable read mode. The guard can be upgraded again after the returned write guard is disposed, so scoped write access can be repeated within one upgradeable read session.
Declaration
public WriteGuard EnterUpgradedWriteGuard()
Returns
| Type | Description |
|---|---|
| WriteGuard |
Exceptions
| Type | Condition |
|---|---|
| ObjectDisposedException | The guard has been disposed. |
| InvalidOperationException | The guard did not enter the lock, has been downgraded to a read lock, is already upgraded, or the operation was attempted on a different thread than the one that entered the lock. |