Enum AsyncReaderWriterLock.LockFlags
- Namespace
- Microsoft.VisualStudio.Threading
- Assembly
- Microsoft.VisualStudio.Threading.dll
Flags that modify default lock behavior.
[Flags]
public enum AsyncReaderWriterLock.LockFlags
Fields
None = 0
The default behavior applies.
StickyWrite = 1
Causes an upgradeable reader to remain in an upgraded-write state once upgraded, even after the nested write lock has been released.
This is useful when you have a batch of possible write operations to apply, which may or may not actually apply in the end, but if any of them change anything, all of their changes should be seen atomically (within a single write lock). This approach is preferable to simply acquiring a write lock around the batch of potential changes because it doesn't defeat concurrent readers until it knows there is a change to actually make.