AsyncReaderWriterLock.WriteLockAsync Method (AsyncReaderWriterLock.LockFlags, CancellationToken)
Microsoft internal only. Gets a write 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 WriteLockAsync ( _
options As AsyncReaderWriterLock.LockFlags, _
cancellationToken As CancellationToken _
) As AsyncReaderWriterLock.Awaitable
public AsyncReaderWriterLock.Awaitable WriteLockAsync(
AsyncReaderWriterLock.LockFlags options,
CancellationToken cancellationToken
)
public:
AsyncReaderWriterLock::Awaitable WriteLockAsync(
AsyncReaderWriterLock::LockFlags options,
CancellationToken cancellationToken
)
member WriteLockAsync :
options:AsyncReaderWriterLock.LockFlags *
cancellationToken:CancellationToken -> AsyncReaderWriterLock.Awaitable
public function WriteLockAsync(
options : AsyncReaderWriterLock.LockFlags,
cancellationToken : CancellationToken
) : AsyncReaderWriterLock.Awaitable
Parameters
options
Type: Microsoft.VisualStudio.Threading.AsyncReaderWriterLock.LockFlagsModifications to normal lock behavior.
cancellationToken
Type: System.Threading.CancellationTokenA 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
- 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.