AsyncReaderWriterResourceLock<TMoniker, TResource>::WriteLockAsync Method (AsyncReaderWriterResourceLock<TMoniker, TResource>::LockFlags, CancellationToken)
Visual Studio 2015
Microsoft internal only.
Assembly: Microsoft.VisualStudio.Threading (in Microsoft.VisualStudio.Threading.dll)
public:
AsyncReaderWriterResourceLock<TMoniker, TResource>::ResourceAwaitable WriteLockAsync(
AsyncReaderWriterResourceLock<TMoniker, TResource>::LockFlags options,
CancellationToken cancellationToken = null
)
Parameters
- options
-
Type:
Microsoft.VisualStudio.Threading::AsyncReaderWriterResourceLock<TMoniker, TResource>::LockFlags
Modifications to normal lock behavior.
- cancellationToken
-
Type:
System.Threading::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.
Return Value
Type: Microsoft.VisualStudio.Threading::AsyncReaderWriterResourceLock<TMoniker, TResource>::ResourceAwaitableAn AsyncReaderWriterResourceLock<TMoniker, TResource>::ResourceAwaitable whose result is the lock releaser.
Show: