Skip to content

Consider adding higher-order overload for Amb #2165

Open
@glopesdev

Description

@glopesdev

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:

public static IObservable<TSource> Amb<TSource>(IObservable<IObservable<TSource>> sources)

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions