Skip to content

Async type reference

The async operators are built from public types too. The async pages show the ones you are most likely to use. This page lists the rest, so every public async type has a home. For the words signal, witness, subscription, coordinator and extensions class, see the type reference.

You never need these to use async streams. Call the operators. See writing your own async operator for how the pieces fit together.

ReactiveUI.Primitives.Async

TypeWhat it isDocumented with
AsyncContextExtensionsHolds IsSameAsCurrentAsyncContext.Utility
AsyncContextSwitcherAwaitableWhat you await to move onto an AsyncContext.Utility
ChainEnumerableSignal<T>Concat on a collection of async streams.Combination
ChainSignalSourcesSignal<T>Concat on an async stream of async streams.Combination
ContextSwitchSignalAsync<T>The signal behind Yield. It moves each notification onto an AsyncContext.Utility
DisposableAsyncExtensionsHolds ToDisposableAsync.Advanced
OptionalExtensionsHolds TryGetValue for Optional<T>.Advanced
SignalAsyncExtensionsHolds every async operator and terminal method.Async streams
SignalExtensionsHolds AsObserverAsync and MapValues for async signals.Signals
SwitchToSignal<T>The signal behind SwitchTo.Combination

ReactiveUI.Primitives.Async.Advanced

Creating streams

TypeWhat it isDocumented with
AsyncEnumerableSignal<T>, AsyncEnumerableSubscription<T>Send the items of an IAsyncEnumerable<T>.FromAsyncEnumerable
BackgroundJobSignal<T>The signal behind CreateAsBackgroundJob.Creation factories
EnumerableSignal<T>, EnumerableSubscription<T>Send the items of a collection, for FromEnumerable and ToAsyncSignal.FromEnumerable
FromAsyncSignal, FromAsyncSubscriptionFromAsync for work with no result. They send RxVoid when it finishes.FromAsync
FromAsyncSignal<T>, FromAsyncSubscription<T>FromAsync for work with a result.FromAsync
IntervalSignal, IntervalSubscriptionThe signal and subscription behind Interval. The counter starts at 0.Interval
ITaskSignalJob<T>The job a TaskSignalState runs for one subscription.Advanced
SequenceSignal, SequenceSubscriptionThe signal and subscription behind Range.Range
StartSignal, StartSubscriptionStart with an action. It sends RxVoid when the action finishes.Start
StartSignal<TResult>, StartSubscription<TResult>Start with a function. It sends the result.Start
TaskResultSignal<T>, TaskResultSubscription<T>ToAsyncSignal on a Task<T>: sends the task's result.ToAsyncSignal
TaskSignalStateRuns one cancellable job for one subscriber, and stops it on dispose.Advanced
TaskToAsyncSignal, ToAsyncSignalSubscriptionToAsyncSignal on a Task: sends RxVoid when it completes.ToAsyncSignal
TimerSignal, TimerSubscriptionThe signal and subscription behind Timer, After and Every.Creation factories
UsingSignal<TResource, T>, UsingWitness<TResource, T>Create a resource for each subscriber and dispose it with the subscription.Creation factories

Operators

TypeWhat it isDocumented with
CallbackWitnessAsync<T>The witness SubscribeAsync builds from your lambdas. An error with no lambda goes to the unhandled exception handler.SubscribeAsync
DoOnSubscribeSignal<T>, DoOnSubscribeAsyncSignal<T>DoOnSubscribe with a plain and an async lambda.Utility
FlatMapSignal<TSource, TResult>, FlatMapCoordinator<TResult>, FlatMapWitness<TSource, TResult>, FlatMapWitness<TResult>SelectMany: the signal, its coordinator, and the witnesses for the source and each inner stream.SelectMany
LeadSubscription<T>The subscription behind Prepend.Prepend
LogErrorsSignal<T>, LogErrorsWitness<T>The signal and witness behind LogErrors.Error handling
ReattemptSubscription<T>, ReattemptWitness<T>The subscription and witness behind Reattempt.Error handling
RelayWitnessAsync<T>The witness behind Wrap. It passes each notification on to another async witness.Utility
SingleElementWitness<T>The witness behind SingleAsync and SingleOrDefaultAsync. It fails as soon as a second match arrives.Results
WitnessOnWitness<T>The witness behind WitnessOn. It moves each notification onto the AsyncContext first.Utility

SyncLatest

TypeWhat it isDocumented with
SyncLatest2Signal<T1, T2, TResult> to SyncLatest16Signal<...>SyncLatest on 2 to 16 streams.SyncLatest
SyncLatest2Coordinator<T1, T2, TResult> to SyncLatest16Coordinator<...>The built-in coordinators for 2 to 16 streams.Combining the latest values yourself
SyncLatest2State<T1, T2> to SyncLatest16State<...>Structs that hold the source streams for each coordinator.Combining the latest values yourself
SyncLatestEnumerableSignal<TSource, TResult>, SyncLatestEnumerableCoordinator<TSource, TResult>, SyncLatestEnumerableWitness<TSource, TResult>SyncLatest on a collection of streams.SyncLatest
SyncLatestWitness<TSource, TResult>The witness the built-in coordinators subscribe to each source.Combining the latest values yourself
SyncLatestCoordinatorExtensionsHolds SubscribeSourcesAsync and SubscribeToSlotAsync.Combining the latest values yourself

Plumbing

TypeWhat it isDocumented with
AsyncSerialGate, AsyncSerialGate.LeaseLets one piece of async work in at a time. Disposing the Lease lets the next one in. The same thread may enter again while it holds the gate.Advanced
PooledDelaySourceReusable, cancellable delays on a TimeProvider, used by Throttle.Time

ReactiveUI.Primitives.Async.Helpers

TypeWhat it isDocumented with
DisposalHelperMethods that dispose something only once, using an int flag.Advanced
SubscriptionHelperSubscribes and disposes the subscription again if a later step throws.Advanced

The two package flavours

ReactiveUI.Primitives.Async.Reactive has every type on this page, compiled against System.Reactive.