Skip to content

AbstractStreamHandler.setDone() missing notifyAll() #404

Description

@elharo

AbstractStreamHandler.waitUntilDone() (line 33) is synchronized and calls wait() in a while (!isDone()) loop. But setDone() (line 47) only sets the done flag — it never calls notifyAll(). If a subclass calls setDone() without also calling notifyAll(), any thread blocked in waitUntilDone() waits forever.

StreamPumper works around this by calling notifyAll() in its own finally block (line 98), but the base class should be correct.

Fix: make setDone() synchronized and add this.notifyAll().

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions