Skip to content

ReactiveUI.Primitives.Async.Advanced namespace

Part of the ReactiveUI.Primitives.Async.Core package.

TypeKindSummary
AsyncSerialGateclassAsynchronous mutual-exclusion primitive that serializes critical sections in the async pipeline. Uncontended acquire is a pure CompareExchange (no SemaphoreSlim touch); the contended path waits on a signal-only semaphore and retries the CAS after each signal. Same-thread reentry is granted via the owner-thread-id and a recursion counter.
CallbackSignalAsyncclassAn observable that invokes a callback to create each subscription.
CallbackWitnessAsyncclassAn witness that routes notifications through user-supplied asynchronous callbacks.
ForwardingWitnessAsyncclassBase observer that forwards every notification to a downstream observer.
IReentrantAsyncDisposableinterfaceAn async-disposable that can be disposed from within its own in-flight notification.
LeasestructReleases a previously acquired [AsyncSerialGate](# when disposed.
MulticastSignalAsyncclassA connectable observable that multicasts notifications from a source observable through a signal.
PooledDelaySourceclassPoolable IValueTaskSource used by DelayAsync for the non-System TimeProvider code path. Replaces the per-call TaskCompletionSource + Task + CancellationTokenRegistration allocation chain with a rented-then-returned instance. The wrapped ManualResetValueTaskSourceCore is the standard poolable async-primitive shape from System.Threading.Tasks.Sources.
RelayWitnessAsyncclassRelays notifications from the base observer pipeline to another asynchronous observer.
SingleElementWitnessclassShared observer used by both SingleAsync and SingleOrDefaultAsync. The two operator surfaces previously held near-identical observer classes; the only behavioural difference is whether an empty sequence throws or returns a caller-supplied default. That difference is now a single flag on this type, so the OnNext / OnErrorResume / OnCompleted bodies live in one place.
SyncLatestCoordinatorBaseclassShared scaffolding for the arity-specific CombineLatestN subscription types. Each per-arity SyncLatestCoordinator derives from this class so the otherwise-identical [SyncLatestLifecycle](# wiring (gate / dispose CTS / external link), the values-lock, the source-subscribe loop, the error-resume forwarder, and [DisposeAsync](# live here once instead of repeated 15× across CombineLatest2..16.
SyncLatestIndexedWitnessclassPer-source [WitnessAsync](# used by every CombineLatestN subscription. The per-arity class previously declared N hand-rolled OnNextN / OnCompletedN method pairs whose bodies differed only in which Optional<TN> field they wrote and which completion bit they passed to the lifecycle. Pre-building N of these witnesses at subscription time keeps the typing exact and eliminates the per-source method declarations from the per-arity files. The closure cost (one delegate per source for the value-write) is paid once at subscribe and not per emission; the actual per-emission cost is one indirect delegate invoke under the values-lock.
SyncLatestLifecycleclassShared subscription lifecycle for the arity-specific CombineLatestN operators (2..16) and the enumerable variant. Each per-arity SyncLatestCoordinator composes one instance of this class (has-a, not is-a) and forwards lifecycle / error / gating work into it, so the previously-duplicated infrastructure (gate, dispose CTS, external-link registration, observer fan-out, completion-bitmask handling) lives in one place.
TakeUntilLifecycleclassShared subscription lifecycle for the TakeUntil family of operators (CancellationToken / Task / raw-signal / async-observable / async-predicate variants). Each per-trigger Subscription composes one instance of this class (has-a, not is-a) and forwards forward-on-next / -error / -completed plus external-cancellation linking into it, so the previously-duplicated infrastructure (gate, dispose CTS, external-link registration, gated observer fan-out) lives in one place.
TakeUntilSourceWitnessclassShared [WitnessAsync](# implementation that forwards every source notification straight into a [TakeUntilLifecycle](# instance. Used by every per-trigger TakeUntil Subscription so the per-operator inner-class shells (which previously held identical three-method forwarders) collapse into a single shared type.
TaskResultCompletionSourceclassCoordinates task completion for terminal observers and disposes the owning subscription when complete.
TaskResultWitnessAsyncBaseclassBase class for witnesses that produce a single task-based result value when the observed sequence completes.
TaskSignalSubscriptionclassProvides factory methods for creating and starting cancelable task-based subscriptions.
TaskSignalSubscriptionclassRepresents an asynchronous subscription that can be cancelled and disposed, managing the lifecycle of an observer and its associated operations.