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.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Threading.AsyncReaderWriterLock
Microsoft.VisualStudio.Threading.AsyncReaderWriterResourceLock<TMoniker, TResource>
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public MustInherit Class AsyncReaderWriterResourceLock(Of TMoniker, TResource As Class) _
Inherits AsyncReaderWriterLock
public abstract class AsyncReaderWriterResourceLock<TMoniker, TResource> : AsyncReaderWriterLock
where TResource : class
generic<typename TMoniker, typename TResource>
where TResource : ref class
public ref class AsyncReaderWriterResourceLock abstract : public AsyncReaderWriterLock
[<AbstractClass>]
type AsyncReaderWriterResourceLock<'TMoniker, 'TResource when 'TResource : not struct> =
class
inherit AsyncReaderWriterLock
end
JScript does not support generic types or methods.
Type Parameters
- TMoniker
The type of the moniker.
- TResource
The type of the resource.
The AsyncReaderWriterResourceLock<TMoniker, TResource> type exposes the following members.
Constructors
Name | Description | |
---|---|---|
AsyncReaderWriterResourceLock<TMoniker, TResource>() | Microsoft internal only. Initializes a new instance of the AsyncReaderWriterResourceLock. | |
AsyncReaderWriterResourceLock<TMoniker, TResource>(Boolean) | Microsoft internal only. Initializes a new instance of the AsyncReaderWriterResourceLock. |
Top
Properties
Name | Description | |
---|---|---|
AmbientLock | Microsoft internal only. Gets the lock held by the caller's execution context. (Inherited from AsyncReaderWriterLock.) | |
CaptureDiagnostics | Microsoft internal only. Determines whether additional resources should be spent to collect information that would be useful in diagnosing deadlocks. (Inherited from AsyncReaderWriterLock.) | |
Completion | Microsoft internal only. Gets a task whose completion signals that this lock will no longer issue locks. (Inherited from AsyncReaderWriterLock.) | |
IsAnyLockHeld | 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.) | |
IsAnyPassiveLockHeld | 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.) | |
IsPassiveReadLockHeld | Determines whether a read lock is held by the caller without regard to the lock compatibility of the caller's context. (Inherited from AsyncReaderWriterLock.) | |
IsPassiveUpgradeableReadLockHeld | 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.) | |
IsPassiveWriteLockHeld | Determines whether a write lock is held by the caller without regard to the lock compatibility of the caller's context. (Inherited from AsyncReaderWriterLock.) | |
IsReadLockHeld | Microsoft internal only. Determines whether the caller holds a read lock. (Inherited from AsyncReaderWriterLock.) | |
IsUpgradeableReadLockHeld | Microsoft internal only. Determines whether the caller holds an upgradeable read lock. (Inherited from AsyncReaderWriterLock.) | |
IsWriteLockHeld | Microsoft internal only. Determines whether the caller holds a write lock. (Inherited from AsyncReaderWriterLock.) | |
SyncObject | Microsoft internal only. Gets the object used to synchronize access to the fields of this instance. (Inherited from AsyncReaderWriterLock.) |
Top
Methods
Name | Description | |
---|---|---|
Complete | 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.) | |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetAggregateLockFlags | Microsoft internal only. Returns the aggregate of the lock flags for all nested locks. | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetResourceAsync | Microsoft internal only. Gets the resource with the specified moniker. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HideLocks | Microsoft internal only. Prevents use or visibility of the caller's lock(s) until the returned value is disposed. (Inherited from AsyncReaderWriterLock.) | |
LockStackContains | Microsoft internal only. Checks whether the aggregated flags from all the locks in the lock stack satisfy the specified flag(s). (Inherited from AsyncReaderWriterLock.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnBeforeExclusiveLockReleasedAsync | Microsoft internal only. Occurs when the last write lock is about to be released. (Inherited from AsyncReaderWriterLock.) | |
OnBeforeLockReleasedAsync | Microsoft internal only. Occurs when any lock is being released. (Inherited from AsyncReaderWriterLock.) | |
OnBeforeWriteLockReleased | 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.) | |
OnCriticalFailure(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.) | |
OnCriticalFailure(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.) | |
OnExclusiveLockReleasedAsync | Microsoft internal only. Occurs after an exclusive lock is released but before anyone has a chance to enter the lock. (Overrides AsyncReaderWriterLock.OnExclusiveLockReleasedAsync().) | |
OnUpgradeableReadLockReleased | Microsoft internal only. Occurs when a top-level upgradeable read lock is released, leaving no remaining (write) lock. (Overrides AsyncReaderWriterLock.OnUpgradeableReadLockReleased().) | |
PrepareResourceForConcurrentAccessAsync | Microsoft internal only. Prepares a resource for concurrent access. | |
PrepareResourceForExclusiveAccessAsync | Microsoft internal only. Prepares a resource for access by one thread. | |
ReadLockAsync | Microsoft internal only. Gets a read lock, asynchronously awaiting for the lock if it is not immediately available. | |
SetResourceAsAccessed(TResource) | Microsoft internal only. Marks a resource as having been retrieved under a lock. | |
SetResourceAsAccessed(Func<TResource, Object, Boolean>, Object) | Microsoft internal only. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
UpgradeableReadLockAsync(CancellationToken) | Microsoft internal only. Obtains a read lock, asynchronously awaiting for the lock if it is not immediately available. | |
UpgradeableReadLockAsync(AsyncReaderWriterLock.LockFlags, CancellationToken) | Microsoft internal only. Gets a read lock, asynchronously awaiting for the lock if it is not immediately available. (Inherited from AsyncReaderWriterLock.) | |
UpgradeableReadLockAsync(AsyncReaderWriterResourceLock<TMoniker, TResource>.LockFlags, CancellationToken) | Microsoft internal only. Obtains a read lock, asynchronously awaiting for the lock if it is not immediately available. | |
WriteLockAsync(CancellationToken) | Microsoft internal only. | |
WriteLockAsync(AsyncReaderWriterLock.LockFlags, CancellationToken) | Microsoft internal only. Gets a write lock, asynchronously awaiting for the lock if it is not immediately available. (Inherited from AsyncReaderWriterLock.) | |
WriteLockAsync(AsyncReaderWriterResourceLock<TMoniker, TResource>.LockFlags, CancellationToken) | Microsoft internal only. |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IHangReportContributor.GetHangReport | Microsoft internal only. data for a hang report. (Inherited from AsyncReaderWriterLock.) |
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.