dotnet / dotnet/reactive

Consider adding higher-order overload for Amb

Open
#2,165 0 comments 2 reactions 0 assignees View on GitHub
[area] Rx
Dominant language
C#
Stars
7.2k
Forks
798
PR merge metrics
No merged PRs in 30d

Description

#### Feature request

> Which next library version (i.e., patch, minor or major)?

minor

> What are the platform(s), environment(s) and related component version(s)?

all platforms

> Please describe the feature.

Add a higher-order overload to `Amb` with the following signature:

```c#
public static IObservable Amb(IObservable> sources)
```

`Amb` currently exposes an overload with `IEnumerable>` allowing for dynamically evaluated sequences of observables competing to react first, but strangely it does not provide the fully reactive counterpart with `IObservable>`.

This would allow for candidate sequences to be computed reactively. The main difference would be not waiting for all sequences to be available before subscribing to candidates. The first sequence to emit a notification would surface all its notifications. All subscriptions to other sequences, including the higher-order sequence, would be cancelled.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.