Skip to content

sample operator with emitLast argument #2149

Open
@gildor

Description

@gildor

Existing sample operator doesn't emit last emitted value on completion, which makes it not useful for streams which emit a final value as last element before complete. On my practice it used often for such things as a stream which represent progress and final result (when sealed class Progress|Success is emitted)

I propose to add emitLast argument with default value false to sample operator, so it will allow supporting this use case.

This behavior already exist in RxJava2, see related issue for RxJava2

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