Skip to content

new method concatMapIterable #3713

Closed
Closed
@benjamindonze

Description

@benjamindonze

Hello,

I think it would be nice to have an concatMapIterable method beeing the counterpart of flatMapIterable.
Indeed concatMapIterable would seems to me the best and safest way to flatten a Observable<List> -> Observable

Problem with flatMapIterable is that as flatMap use by default an unbounded buffer and unlimited source subscription. I recently had the problem having a producer producing faster than a consumer.
I naively used flatMap(t->Observable.from(t)) or flatMapIterable to flatten the produced list wich always lead to OutOfMemory.
concatMap on the other way doesn't have this issue and thus would be safer to use to flatten Observable for which you don't have implementation detail.

I'm quite new with RxJava so please tell me if I totaly missed the point.

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