AsyncReaderWriterLock::UpgradeableReadLockAsync Method (AsyncReaderWriterLock::LockFlags, CancellationToken)
Visual Studio 2015
Microsoft internal only. Gets a read lock, asynchronously awaiting for the lock if it is not immediately available.
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
public:
AsyncReaderWriterLock::Awaitable UpgradeableReadLockAsync(
AsyncReaderWriterLock::LockFlags options,
CancellationToken cancellationToken = null
)
Parameters
- options
-
Type:
Microsoft.VisualStudio.Threading::AsyncReaderWriterLock::LockFlags
Modifications to normal lock behavior.
- cancellationToken
-
Type:
System.Threading::CancellationToken
A token whose cancelation indicates lost interest in obtaining the lock. A canceled token does not release a lock that has already been issued. If the lock isn't immediately available, a canceled token causes the code that is waiting for the lock to resume with an OperationCanceledException.
Return Value
Type: Microsoft.VisualStudio.Threading::AsyncReaderWriterLock::AwaitableAn AsyncReaderWriterLock::Awaitable whose result is the lock releaser.
Show: