Skip to content

Deadlock #6945

@adrian-linca

Description

@adrian-linca

RXJava 3.0.1.
I randomly got into a weird situation where my code entered a deadlock and I don't know why.
I simplified the code and got to the below part which will enter a deadlock and never return.
This seems like a bug, but maybe I'm missing something.
The code:

Observable
    .range(1, 20)
    .flatMap(
            integer -> {
                if (integer % 5 != 0) {
                    return Observable
                            .just(integer);
                }

                return Observable
                        .just(-integer)
                        .observeOn(Schedulers.io());
            },
            false,
            1
    )
    .ignoreElements()
    .blockingAwait();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions