On Wed, 27 May 2026 18:23:09 GMT, Phil Race <[email protected]> wrote:
>>>I have no reason to suppose any ordering problem here.
>>
>> One of them is static, another one is constructor, and the third one is
>> EventQueue.push which may set that static field directly. There is should be
>> a way to break that by calling in some specific order. there is no any
>> specific synchronizations or locks/ or something.
>
> push() is an instance method of the EQ. So some EQ has been initialized
> before we get there. And there is locking for the push/pop.
> And the setting of the "currentQueue", even when it was per-app context was
> not in a synchronized block - not sure if that's what you are asking for but
> I'm not seeing any reason to add it now.
EQ is not final, so the user may have its own EQ. it should be possible to
break it by this order:
Suntoolkit->contructor->initEQ()->
if (currentEventQueue == null) {
currentEventQueue = new EventQueue();
<--sleep here-->
postEventQueue = new PostEventQueue(currentEventQueue);
}
then:
EventQueue->push()->
if (SunToolkit.currentEventQueue == topQueue) {
SunToolkit.currentEventQueue = newEventQueue;
}
then
Suntoolkit->contructor->initEQ()->
<--wakeup here-->
postEventQueue = new PostEventQueue(currentEventQueue);
}
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/31262#discussion_r3313201198