Compartilhar via


AsyncReaderWriterResourceLock<TMoniker, TResource>.LockFlags Enumeration

Microsoft internal only. Flags that modify the default lock behavior.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:  Microsoft.VisualStudio.Threading
Assembly:  Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)

Syntax

'Declaration
<FlagsAttribute> _
Public Enumeration LockFlags
[FlagsAttribute]
public enum LockFlags
[FlagsAttribute]
public enum class LockFlags
[<FlagsAttribute>]
type LockFlags
public enum LockFlags

Members

Member name Description
None Microsoft internal only. The default behavior.
SkipInitialPreparation Microsoft internal only. Skips a step to make sure that the resource is initially prepared when retrieved using GetResourceAsync.
StickyWrite Microsoft internal only. 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, 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 actually a change to be made.

See Also

Reference

Microsoft.VisualStudio.Threading Namespace