AsyncReaderWriterResourceLock<TMoniker,TResource> Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
generic <typename TMoniker, typename TResource>
where TResource : classpublic ref class AsyncReaderWriterResourceLock abstract : Microsoft::VisualStudio::Threading::AsyncReaderWriterLock
public abstract class AsyncReaderWriterResourceLock<TMoniker,TResource> : Microsoft.VisualStudio.Threading.AsyncReaderWriterLock where TResource : class
type AsyncReaderWriterResourceLock<'Moniker, 'Resource (requires 'Resource : null)> = class
inherit AsyncReaderWriterLock
Public MustInherit Class AsyncReaderWriterResourceLock(Of TMoniker, TResource)
Inherits AsyncReaderWriterLock
- TMoniker
The type of the moniker that identifies a resource.
- TResource
The type of resource issued for access by this lock.
- Inheritance
Async |
Initializes a new instance of the AsyncReaderWriterResourceLock<TMoniker,TResource> class. |
Async |
Initializes a new instance of the AsyncReaderWriterResourceLock<TMoniker,TResource> class. |
Async |
Initializes a new instance of the AsyncReaderWriterResourceLock<TMoniker,TResource> class. |
Ambient |
Gets the lock held by the caller's execution context. (Inherited from AsyncReaderWriterLock) |
Can |
Gets a value indicating whether the current thread is allowed to hold an active lock. (Inherited from AsyncReaderWriterLock) |
Capture |
Gets or sets a value indicating whether additional resources should be spent to collect information that would be useful in diagnosing deadlocks, etc. (Inherited from AsyncReaderWriterLock) |
Completion |
Gets a task whose completion signals that this lock will no longer issue locks. (Inherited from AsyncReaderWriterLock) |
Deadlock |
Gets a time delay to check whether pending writer lock and reader locks forms a deadlock. (Inherited from AsyncReaderWriterLock) |
Is |
Gets a value indicating whether any kind of lock is held by the caller and can be immediately used given the caller's context. (Inherited from AsyncReaderWriterLock) |
Is |
Gets a value indicating whether any kind of lock is held by the caller without regard to the lock compatibility of the caller's context. (Inherited from AsyncReaderWriterLock) |
Is |
Gets a value indicating whether a read lock is held by the caller without regard to the lock compatibility of the caller's context. (Inherited from AsyncReaderWriterLock) |
Is |
Gets a value indicating whether an upgradeable read lock is held by the caller without regard to the lock compatibility of the caller's context. (Inherited from AsyncReaderWriterLock) |
Is |
Gets a value indicating whether a write lock is held by the caller without regard to the lock compatibility of the caller's context. (Inherited from AsyncReaderWriterLock) |
Is |
Gets a value indicating whether the caller holds a read lock. (Inherited from AsyncReaderWriterLock) |
Is |
Gets a value indicating whether the current SynchronizationContext is one that is not supported by this lock. (Inherited from AsyncReaderWriterLock) |
Is |
Gets a value indicating whether the caller holds an upgradeable read lock. (Inherited from AsyncReaderWriterLock) |
Is |
Gets a value indicating whether the caller holds a write lock. (Inherited from AsyncReaderWriterLock) |
No |
Gets a SynchronizationContext which, when applied, suppresses any message pump that may run during synchronous blocks of the calling thread. (Inherited from AsyncReaderWriterLock) |
Sync |
Gets the object used to synchronize access to this instance's fields. (Inherited from AsyncReaderWriterLock) |
Complete() |
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) |
Dispose() | (Inherited from AsyncReaderWriterLock) |
Dispose(Boolean) |
Disposes managed and unmanaged resources held by this instance. (Inherited from AsyncReaderWriterLock) |
Get |
Returns the aggregate of the lock flags for all nested locks. |
Get |
Contributes data for a hang report. (Inherited from AsyncReaderWriterLock) |
Get |
Retrieves the resource with the specified moniker. |
Get |
Get the task scheduler to execute the continuation when the lock is acquired. AsyncReaderWriterLock uses a special SynchronizationContext to handle exclusive locks, and will ignore task scheduler provided, so this is only used in a read lock scenario. This method is called within the execution context to wait the read lock, so it can pick up TaskScheduler based on the current execution context. Note: the task scheduler is only used, when the lock is issued later. If the lock is issued immediately when CanCurrentThreadHoldActiveLock returns true, it will be ignored. (Inherited from AsyncReaderWriterLock) |
Get |
Gets a task scheduler to prepare a resource for concurrent access. |
Hide |
Prevents use or visibility of the caller's lock(s) until the returned value is disposed. (Inherited from AsyncReaderWriterLock) |
Lock |
Checks whether the aggregated flags from all locks in the lock stack satisfy the specified flag(s). (Inherited from AsyncReaderWriterLock) |
On |
Fired when the last write lock is about to be released. (Inherited from AsyncReaderWriterLock) |
On |
Fired when any lock is being released. (Inherited from AsyncReaderWriterLock) |
On |
Registers a callback to be invoked when the write lock held by the caller is about to be ultimately released (outermost write lock). (Inherited from AsyncReaderWriterLock) |
On |
Invoked when the lock detects an internal error or illegal usage pattern that indicates a serious flaw that should be immediately reported to the application and/or bring down the process to avoid hangs or data corruption. (Inherited from AsyncReaderWriterLock) |
On |
Invoked when the lock detects an internal error or illegal usage pattern that indicates a serious flaw that should be immediately reported to the application and/or bring down the process to avoid hangs or data corruption. (Inherited from AsyncReaderWriterLock) |
On |
Invoked after an exclusive lock is released but before anyone has a chance to enter the lock. |
On |
Invoked when a top-level upgradeable read lock is released, leaving no remaining (write) lock. |
Prepare |
Prepares a resource for concurrent access. |
Prepare |
Prepares a resource for access by one thread. |
Read |
Obtains a read lock, asynchronously awaiting for the lock if it is not immediately available. |
Set |
Sets all the resources to be considered in an unknown state. |
Set |
Marks any loaded resources as having been retrieved under a lock if they satisfy some predicate. |
Set |
Marks a resource as having been retrieved under a lock. |
Upgradeable |
Obtains a read lock, asynchronously awaiting for the lock if it is not immediately available. (Inherited from AsyncReaderWriterLock) |
Upgradeable |
Obtains a read lock, asynchronously awaiting for the lock if it is not immediately available. |
Upgradeable |
Obtains an upgradeable read lock, asynchronously awaiting for the lock if it is not immediately available. |
Write |
Obtains a write lock, asynchronously awaiting for the lock if it is not immediately available. (Inherited from AsyncReaderWriterLock) |
Write |
Obtains a write lock, asynchronously awaiting for the lock if it is not immediately available. |
Write |
Obtains a write lock, asynchronously awaiting for the lock if it is not immediately available. |
IHang |
Contributes data for a hang report. (Inherited from AsyncReaderWriterLock) |
Proizvod | Verzije |
---|---|
Visual Studio SDK | 2015, 2017, 2019, 2022 |
This type is thread-safe for all members.