[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-2d-dev
Subject: Re: RFR: 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished [v8]
From: Sergey Bylokhov <serb () openjdk ! org>
Date: 2023-01-31 23:55:53
Message-ID: 2iqTlhXat4p5UQFfk340a4WvY36dOlon_LGhMFX_4Ls=.598001c6-43c3-492c-9b78-974afc3d43a8 () github ! com
[Download RAW message or body]
On Tue, 31 Jan 2023 15:34:44 GMT, Prasanta Sadhukhan <psadhukhan@openjdk.org> wrote:
> > SwingWorker done() method [spec \
> > ](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/SwingWorker.java#L452) \
> > says "Executed on the Event Dispatch Thread after the doInBackground method is \
> > finished" but there's no mechanism in place to honor that claim.
> > The [spec](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/SwingWorker.java#L289)
> > also says the state should be DONE after doInBackground() returns which is also \
> > not done.
> > Modified the code to honour the specification.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional \
> commit since the last revision:
> Test update
How the updated code is supposed to work if the worker will have some state updated \
by the "doInBackground" and used by the "done" method. I guess if the \
"doInBackground" will be canceled the "done" method may throw an exception? Do we \
have such usage in our codebase?
-------------
PR: https://git.openjdk.org/jdk/pull/11940
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic