Table of Contents

Struct AsyncReaderWriterResourceLock<TMoniker, TResource>.ResourceAwaiter

Namespace
Microsoft.VisualStudio.Threading
Assembly
Microsoft.VisualStudio.Threading.dll

Manages asynchronous access to a lock.

public readonly struct AsyncReaderWriterResourceLock<TMoniker, TResource>.ResourceAwaiter : ICriticalNotifyCompletion, INotifyCompletion
Implements
Inherited Members

Properties

IsCompleted

Gets a value indicating whether the lock has been issued.

public bool IsCompleted { get; }

Property Value

bool

Methods

GetResult()

Applies the issued lock to the caller and returns the value used to release the lock.

public AsyncReaderWriterResourceLock<TMoniker, TResource>.ResourceReleaser GetResult()

Returns

AsyncReaderWriterResourceLock<TMoniker, TResource>.ResourceReleaser

The value to dispose of to release the lock.

OnCompleted(Action)

Sets the delegate to execute when the lock is available.

public void OnCompleted(Action continuation)

Parameters

continuation Action

The delegate.

UnsafeOnCompleted(Action)

Sets the delegate to execute when the lock is available.

public void UnsafeOnCompleted(Action continuation)

Parameters

continuation Action

The delegate.