Ferrous API Reference

All Types / Ferrous.Concurrency

struct AsyncMutexGuard<T> [MustUse]

public struct AsyncMutexGuard<T> : IDisposable

A RAII guard providing exclusive access to the value owned by an AsyncMutex<T>.

Type Parameters
T
The type of the protected value.

Properties

public readonly ref T Value

Gets a managed reference to the protected value.

Exceptions
ObjectDisposedException
Thrown if this guard has already been disposed or is uninitialized.

Methods

public void Dispose()

Releases the underlying AsyncMutex<T> lock. Safe to call more than once.