Freigeben über


AsyncReaderWriterLock.UpgradeableReadLockAsync Method (CancellationToken)

Microsoft internal only. Gets 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 ( _
    cancellationToken As CancellationToken _
) As AsyncReaderWriterLock.Awaitable
public AsyncReaderWriterLock.Awaitable UpgradeableReadLockAsync(
    CancellationToken cancellationToken
)
public:
AsyncReaderWriterLock::Awaitable UpgradeableReadLockAsync(
    CancellationToken cancellationToken
)
member UpgradeableReadLockAsync : 
        cancellationToken:CancellationToken -> AsyncReaderWriterLock.Awaitable
public function UpgradeableReadLockAsync(
    cancellationToken : CancellationToken
) : AsyncReaderWriterLock.Awaitable

Parameters

  • 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.Awaitable
An AsyncReaderWriterLock.Awaitable whose result is the lock releaser.

.NET Framework Security

See Also

Reference

AsyncReaderWriterLock Class

UpgradeableReadLockAsync Overload

Microsoft.VisualStudio.Threading Namespace