AsyncReaderWriterResourceLock<TMoniker, TResource> Class

 

Microsoft internal only. A non-blocking lock that allows concurrent access, exclusive access, or concurrent with upgradeability to exclusive access, making special allowances for resources that must be prepared for concurrent or exclusive access.

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

System.Object
  Microsoft.VisualStudio.Threading.AsyncReaderWriterLock
    Microsoft.VisualStudio.Threading.AsyncReaderWriterResourceLock<TMoniker, TResource>

public abstract class AsyncReaderWriterResourceLock<TMoniker, TResource> : AsyncReaderWriterLock
where TResource : class

Type Parameters

TMoniker

The type of the moniker.

TResource

The type of the resource.

NameDescription
System_CAPS_pubmethodAsyncReaderWriterResourceLock<TMoniker, TResource>()

Microsoft internal only. Initializes a new instance of the AsyncReaderWriterResourceLock.

System_CAPS_pubmethodAsyncReaderWriterResourceLock<TMoniker, TResource>(Boolean)

Microsoft internal only. Initializes a new instance of the AsyncReaderWriterResourceLock.

NameDescription
System_CAPS_protpropertyAmbientLock

Microsoft internal only. Gets the lock held by the caller's execution context.(Inherited from AsyncReaderWriterLock.)

System_CAPS_protpropertyCaptureDiagnostics

Microsoft internal only. Determines whether additional resources should be spent to collect information that would be useful in diagnosing deadlocks.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubpropertyCompletion

Microsoft internal only. Gets a task whose completion signals that this lock will no longer issue locks.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubpropertyIsAnyLockHeld

Microsoft internal only. Determines whether any kind of lock is held by the caller and can be immediately used given the caller's context.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubpropertyIsAnyPassiveLockHeld

Microsoft internal only. Determines whether any kind of lock is held by the caller without regard to the lock compatibility of the caller's context.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubpropertyIsPassiveReadLockHeld

Determines whether a read lock is held by the caller without regard to the lock compatibility of the caller's context.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubpropertyIsPassiveUpgradeableReadLockHeld

Determines whether an upgradeable read lock is held by the caller without regard to the lock compatibility of the caller's context.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubpropertyIsPassiveWriteLockHeld

Determines whether a write lock is held by the caller without regard to the lock compatibility of the caller's context.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubpropertyIsReadLockHeld

Microsoft internal only. Determines whether the caller holds a read lock.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubpropertyIsUpgradeableReadLockHeld

Microsoft internal only. Determines whether the caller holds an upgradeable read lock.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubpropertyIsWriteLockHeld

Microsoft internal only. Determines whether the caller holds a write lock.(Inherited from AsyncReaderWriterLock.)

System_CAPS_protpropertySyncObject

Microsoft internal only. Gets the object used to synchronize access to the fields of this instance.(Inherited from AsyncReaderWriterLock.)

NameDescription
System_CAPS_pubmethodComplete()

Microsoft internal only. Causes new top-level lock requests to be rejected and the Completion task to transition to a completed state after any issued locks have been released.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_protmethodGetAggregateLockFlags()

Microsoft internal only. Returns the aggregate of the lock flags for all nested locks.

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_protmethodGetResourceAsync(TMoniker, CancellationToken)

Microsoft internal only. Gets the resource with the specified moniker.

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodHideLocks()

Microsoft internal only. Prevents use or visibility of the caller's lock(s) until the returned value is disposed.(Inherited from AsyncReaderWriterLock.)

System_CAPS_protmethodLockStackContains(AsyncReaderWriterLock.LockFlags, AsyncReaderWriterLock.LockHandle)

Microsoft internal only. Checks whether the aggregated flags from all the locks in the lock stack satisfy the specified flag(s).(Inherited from AsyncReaderWriterLock.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethodOnBeforeExclusiveLockReleasedAsync()

Microsoft internal only. Occurs when the last write lock is about to be released.(Inherited from AsyncReaderWriterLock.)

System_CAPS_protmethodOnBeforeLockReleasedAsync(Boolean, AsyncReaderWriterLock.LockHandle)

Microsoft internal only. Occurs when any lock is being released.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubmethodOnBeforeWriteLockReleased(Func<Task>)

Microsoft internal only. Registers a callback that is invoked when the outermost write lock held by the caller is about to be released.(Inherited from AsyncReaderWriterLock.)

System_CAPS_protmethodOnCriticalFailure(Exception)

Occurs when the lock detects an internal error or illegal usage pattern that indicates a serious flaw that should be immediately reported to the application, while possibly also stopping the process to avoid hangs or data corruption.(Inherited from AsyncReaderWriterLock.)

System_CAPS_protmethodOnCriticalFailure(String)

Occurs when the lock detects an internal error or illegal usage pattern that indicates a serious flaw that should be immediately reported to the application, while possibly also stopping the process to avoid hangs or data corruption.(Inherited from AsyncReaderWriterLock.)

System_CAPS_protmethodOnExclusiveLockReleasedAsync()

Microsoft internal only. Occurs after an exclusive lock is released but before anyone has a chance to enter the lock.(Overrides AsyncReaderWriterLock.OnExclusiveLockReleasedAsync().)

System_CAPS_protmethodOnUpgradeableReadLockReleased()

Microsoft internal only. Occurs when a top-level upgradeable read lock is released, leaving no remaining (write) lock.(Overrides AsyncReaderWriterLock.OnUpgradeableReadLockReleased().)

System_CAPS_protmethodPrepareResourceForConcurrentAccessAsync(TResource, CancellationToken)

Microsoft internal only. Prepares a resource for concurrent access.

System_CAPS_protmethodPrepareResourceForExclusiveAccessAsync(TResource, AsyncReaderWriterResourceLock<TMoniker, TResource>.LockFlags, CancellationToken)

Microsoft internal only. Prepares a resource for access by one thread.

System_CAPS_pubmethodReadLockAsync(CancellationToken)

Microsoft internal only. Gets a read lock, asynchronously awaiting for the lock if it is not immediately available.

System_CAPS_protmethodSetResourceAsAccessed(TResource)

Microsoft internal only. Marks a resource as having been retrieved under a lock.

System_CAPS_protmethodSetResourceAsAccessed(Func<TResource, Object, Boolean>, Object)

Microsoft internal only.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_pubmethodUpgradeableReadLockAsync(AsyncReaderWriterResourceLock<TMoniker, TResource>.LockFlags, CancellationToken)

Microsoft internal only. Obtains a read lock, asynchronously awaiting for the lock if it is not immediately available.

System_CAPS_pubmethodUpgradeableReadLockAsync(CancellationToken)

Microsoft internal only. Obtains a read lock, asynchronously awaiting for the lock if it is not immediately available.

System_CAPS_pubmethodUpgradeableReadLockAsync(AsyncReaderWriterLock.LockFlags, CancellationToken)

Microsoft internal only. Gets a read lock, asynchronously awaiting for the lock if it is not immediately available.(Inherited from AsyncReaderWriterLock.)

System_CAPS_pubmethodWriteLockAsync(AsyncReaderWriterResourceLock<TMoniker, TResource>.LockFlags, CancellationToken)

Microsoft internal only.

System_CAPS_pubmethodWriteLockAsync(CancellationToken)

Microsoft internal only.

System_CAPS_pubmethodWriteLockAsync(AsyncReaderWriterLock.LockFlags, CancellationToken)

Microsoft internal only. Gets a write lock, asynchronously awaiting for the lock if it is not immediately available.(Inherited from AsyncReaderWriterLock.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIHangReportContributor.GetHangReport()

Microsoft internal only. data for a hang report.(Inherited from AsyncReaderWriterLock.)

This type is thread-safe for all members.

Return to top
Show: