Skip to content

2.0.4: an infinite disposable #5004

Closed
Closed
@konmik

Description

@konmik

This fails:

@Test
public void directScheduleOnSingleThreadExecutor() {
    Scheduler scheduler = Schedulers.from(Executors.newSingleThreadExecutor());

    Disposable disposable = scheduler.scheduleDirect(() -> {
    });

    long start = nanoTime();
    while (!disposable.isDisposed()) {
        assertTrue(nanoTime() - start < SECONDS.toNanos(10));
    }
}

while replacing from(...) with io() works

I can't find where the error exactly is, my debugger can't jump in to the right source code line.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions