RFR: 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished [v10]

Sergey Bylokhov serb at openjdk.org
Wed Feb 8 01:25:47 UTC 2023


On Fri, 3 Feb 2023 13:07:41 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

> The specification isn't clear, and some parts somewhat contradict each other. Logically, the state should transition to DONE as soon as doInBackground completes. Then both done method and listeners are called when the state is DONE that is the background work is complete.

Which parts are contradicts? I mean that the old implementation call DONE-listener last, as specified in the header of the class what part of the spec mention different behavior? Above we discussed that it is possible to see a difference if the listener will do some work on EDT, after the fix the listener will not be called last, is that safe to assume it does not break something?

-------------

PR: https://git.openjdk.org/jdk/pull/11940



More information about the client-libs-dev mailing list