Skip to content

2.x support another source at takeUntil method #6107

@JSpiner

Description

@JSpiner

I would like to suggest a new feature.

The observable.takeUntil function provides the following two types.

- takeUntil(ObservableSource<U> other)
- takeUntil(Predicate<? super T> stopPredicate)

TakeUntil, which combines the two sources, the first function. This controls until the first item is emitted as shown below.

2018-07-26 11 15 06

The point at which takeUntil controls is when the first item is emit, not when onComplete is called.

here I thought.
'If it detects when the first item is emit, is it possible to support Single or Completable...etc as well as Observable?'

If this suggestion does not depart from the intent of takeUntil of reactiveX,
I want to make a Pull Request that adds the following function.

- takeUntil(SingleSource<U> other)
- takeUntil(MaybeSource<U> other)
- takeUntil(CompletableSource<U> other)
- takeUntil(FlowableSource<U> other)

If this goes depart from the intent, please tell me why.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions