Skip to content

)} ,System.TimeSpan)} ,System.Reactive.Concurrency.IScheduler)} ,System.Reactive.Concurrency.IScheduler,System.TimeSpan)}

ObservableSubscriptionExtensions.WaitForCompletion(IObservable) method

Defined in

Type: ObservableSubscriptionExtensions Namespace: ReactiveUI.Extensions Assembly: ReactiveUI.Extensions.dll

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

Overloads

  • 1. public static void WaitForCompletion(this IObservable<Unit> source)
  • 2. public static void WaitForCompletion(this IObservable<Unit> source, TimeSpan timeout)
  • 3. public static void WaitForCompletion(this IObservable<Unit> source, IScheduler scheduler)
  • 4. public static void WaitForCompletion(this IObservable<Unit> source, IScheduler scheduler, TimeSpan timeout)

1. Overload

public static void WaitForCompletion(this IObservable<Unit> source)

View source

Summary: Blocks until a Unit-producing source completes (default 30s timeout); rethrows any captured error.

Parameters

NameTypeDescription
sourceIObservableThe observable to subscribe to.

2. Overload

public static void WaitForCompletion(this IObservable<Unit> source, TimeSpan timeout)

View source

Summary: Blocks until a Unit-producing source completes, honoring an explicit timeout; rethrows any captured error.

Parameters

NameTypeDescription
sourceIObservableThe observable to subscribe to.
timeoutTimeSpanThe wait timeout.

3. Overload

public static void WaitForCompletion(this IObservable<Unit> source, IScheduler scheduler)

View source

Summary: Blocks until a Unit-producing source completes, routing the subscribe call through scheduler; rethrows any captured error.

Parameters

NameTypeDescription
sourceIObservableThe observable to subscribe to.
scheduler[IScheduler](#Scheduler used to dispatch the subscribe call.

4. Overload

public static void WaitForCompletion(this IObservable<Unit> source, IScheduler scheduler, TimeSpan timeout)

View source

Summary: Blocks until a Unit-producing source completes, routing the subscribe call through scheduler with an explicit timeout; rethrows any captured error.

Parameters

NameTypeDescription
sourceIObservableThe observable to subscribe to.
scheduler[IScheduler](#Scheduler used to dispatch the subscribe call.
timeoutTimeSpanThe wait timeout.