DisposableAsyncSlot class¶
Defined in
Namespace: ReactiveUI.Extensions.Async.Disposables
Assembly: ReactiveUI.Extensions.dll
Full name: ReactiveUI.Extensions.Async.Disposables.DisposableAsyncSlot
Modifiers: public static
Summary¶
Zero-allocation static helpers that implement SerialDisposableAsync-style swap and SingleAssignmentDisposableAsync-style single-assignment semantics directly against a caller-owned IAsyncDisposable field. Use these when the wrapper-class allocation that the convenience types incur is on a hot path.
Applies to
net10.0, net10.0-browserwasm1.0, net10.0-desktop1.0, net9.0, net9.0-browserwasm1.0, net9.0-desktop1.0, net8.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-macos14.5, net8.0-tvos17.2, netstandard2.1, net462, net481
Methods¶
| Name | Summary |
|---|---|
| static SwapAsync | Swaps the slot's current contents with value and asynchronously disposes the previous occupant. Equivalent to ... |
| static AssignAsync | Atomically assigns value to the slot exactly once. If the slot has already been disposed, value is disposed immediately. If the slot already holds a non-null, non-disposed value, throws... |
| static DisposeAsync | Asynchronously disposes the slot's current contents and marks the slot as disposed. Subsequent [SwapAsync][M:ReactiveUI.Extensions.Async.Disposables.DisposableAsyncSlot.SwapAsync(System.IAsyncDispos... |
| static IsDisposed | Returns true if the slot has been disposed via [DisposeAsync](# |