Table of Contents

Struct AsyncReaderWriterLock.Releaser

Namespace
Microsoft.VisualStudio.Threading
Assembly
Microsoft.VisualStudio.Threading.dll

A value whose disposal releases a held lock.

public readonly struct AsyncReaderWriterLock.Releaser : IDisposable, IAsyncDisposable
Implements
Inherited Members

Methods

Dispose()

Releases the lock.

public void Dispose()

DisposeAsync()

Releases the lock.

public ValueTask DisposeAsync()

Returns

ValueTask

ReleaseAsync()

Asynchronously releases the lock. Dispose should still be called after this.

public Task ReleaseAsync()

Returns

Task

A task that should complete before the releasing thread accesses any resource protected by a lock wrapping the lock being released.

Remarks

Rather than calling this method explicitly, use the C# 8 "await using" syntax instead.