AsyncReaderWriterLock.Releaser Struct
Definition
- Assembly
- Bodu.Core.dll
- Package
- Bodu.Core 1.0.1
Represents acquired access to an AsyncReaderWriterLock. Disposing the releaser releases the read or write access it represents.
public readonly struct AsyncReaderWriterLock.Releaser : IDisposable
- Implements
- Inherited Members
- Extension Methods
Remarks
The releaser is a lightweight value type returned by ReaderAsync() and
WriterAsync(), typically consumed by a single using statement. It is idempotent:
disposing it more than once, or disposing several copies of the same value, releases the underlying access
exactly once. This prevents accidental double-disposal from corrupting the reader count or granting overlapping
access, at the cost of one small allocation per acquisition for the shared idempotency guard.
Methods
Dispose()
Releases the read or write access represented by this releaser. Subsequent calls, including calls on copies of the same value, are no-ops.
public void Dispose()
Applies to
| Product | Versions |
|---|---|
| .NET | 8, 10 |