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

Alexey Ivanov aivanov at openjdk.org
Thu Jan 12 21:36:16 UTC 2023


On Thu, 12 Jan 2023 10:41:55 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix
>
> src/java.desktop/share/classes/javax/swing/SwingWorker.java line 757:
> 
>> 755:                 do {
>> 756:                     try {
>> 757:                         Thread.sleep(100);
> 
> I did not look closely at the discussion in JBS about this change, but this "sleep(100)" looks broken. I do not think we can block EDT like this.

I agree it doesn't look good. If adding `sleep` is needed, there's something wrong.

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

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



More information about the client-libs-dev mailing list