AsyncReaderWriterResourceLock<TMoniker, TResource>.UpgradeableReadLockAsync Method (AsyncReaderWriterResourceLock<TMoniker, TResource>.LockFlags, CancellationToken)
Microsoft internal only. Obtains a read lock, asynchronously awaiting for the lock if it is not immediately available.
Namespace: Microsoft.VisualStudio.Threading
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
Syntax
'Declaration
Public Function UpgradeableReadLockAsync ( _
options As AsyncReaderWriterResourceLock(Of T).LockFlags, _
cancellationToken As CancellationToken _
) As AsyncReaderWriterResourceLock(Of T).ResourceAwaitable
public AsyncReaderWriterResourceLock<T>.ResourceAwaitable UpgradeableReadLockAsync(
AsyncReaderWriterResourceLock<T>.LockFlags options,
CancellationToken cancellationToken
)
public:
AsyncReaderWriterResourceLock<T>::ResourceAwaitable UpgradeableReadLockAsync(
AsyncReaderWriterResourceLock<T>::LockFlags options,
CancellationToken cancellationToken
)
member UpgradeableReadLockAsync :
options:AsyncReaderWriterResourceLock<T>.LockFlags *
cancellationToken:CancellationToken -> AsyncReaderWriterResourceLock<T>.ResourceAwaitable
public function UpgradeableReadLockAsync(
options : AsyncReaderWriterResourceLock<TMoniker, TResource>.LockFlags,
cancellationToken : CancellationToken
) : AsyncReaderWriterResourceLock<TMoniker, TResource>.ResourceAwaitable
Parameters
options
Type: Microsoft.VisualStudio.Threading.AsyncReaderWriterResourceLock<TMoniker, TResource>.LockFlagsModifications to normal lock behavior.
cancellationToken
Type: System.Threading.CancellationTokenA token whose cancellation indicates lost interest in obtaining the lock. A canceled token does not release a lock that has already been issued. But if the lock isn't immediately available, a canceled token will cause the code that is waiting for the lock to resume with an OperationCanceledException.
Return Value
Type: Microsoft.VisualStudio.Threading.AsyncReaderWriterResourceLock<TMoniker, TResource>.ResourceAwaitable
An AsyncReaderWriterResourceLock<TMoniker, TResource>.ResourceAwaitable whose result is the lock releaser.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
AsyncReaderWriterResourceLock<TMoniker, TResource> Class