次の方法で共有


AsyncReaderWriterLock.UpgradeableReadLockAsync Method

Definition

Overloads

UpgradeableReadLockAsync(CancellationToken)

Obtains an upgradeable read lock, asynchronously awaiting for the lock if it is not immediately available.

UpgradeableReadLockAsync(AsyncReaderWriterLock+LockFlags, CancellationToken)

Obtains a read lock, asynchronously awaiting for the lock if it is not immediately available.

UpgradeableReadLockAsync(CancellationToken)

Obtains an upgradeable read lock, asynchronously awaiting for the lock if it is not immediately available.

public Microsoft.VisualStudio.Threading.AsyncReaderWriterLock.Awaitable UpgradeableReadLockAsync (System.Threading.CancellationToken cancellationToken = default);
member this.UpgradeableReadLockAsync : System.Threading.CancellationToken -> Microsoft.VisualStudio.Threading.AsyncReaderWriterLock.Awaitable
Public Function UpgradeableReadLockAsync (Optional cancellationToken As CancellationToken = Nothing) As AsyncReaderWriterLock.Awaitable

Parameters

cancellationToken
CancellationToken

A 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.

Returns

An awaitable object whose result is the lock releaser.

Applies to

UpgradeableReadLockAsync(AsyncReaderWriterLock+LockFlags, CancellationToken)

Obtains a read lock, asynchronously awaiting for the lock if it is not immediately available.

public Microsoft.VisualStudio.Threading.AsyncReaderWriterLock.Awaitable UpgradeableReadLockAsync (Microsoft.VisualStudio.Threading.AsyncReaderWriterLock.LockFlags options, System.Threading.CancellationToken cancellationToken = default);
member this.UpgradeableReadLockAsync : Microsoft.VisualStudio.Threading.AsyncReaderWriterLock.LockFlags * System.Threading.CancellationToken -> Microsoft.VisualStudio.Threading.AsyncReaderWriterLock.Awaitable
Public Function UpgradeableReadLockAsync (options As AsyncReaderWriterLock.LockFlags, Optional cancellationToken As CancellationToken = Nothing) As AsyncReaderWriterLock.Awaitable

Parameters

options
AsyncReaderWriterLock.LockFlags

Modifications to normal lock behavior.

cancellationToken
CancellationToken

A 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.

Returns

An awaitable object whose result is the lock releaser.

Applies to