Skip to content

2.x concatMapEager should accept 0 for prefetch #5185

@ansman

Description

@ansman

The documentation for concatMapEager states:

@param prefetch hints about the number of expected source sequence values

Which leads me to assume that the following code should work:

Observable.fromIterable(someCollection)
    .concatMapEager(this::performTask, 5, someCollection.size())

but it will fail if the collection is empty. Either the documentation should be updated to reflect that 0 is not a valid value or it should accept 0 (and perhaps set it to a default value internally).

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