On Wed, 27 May 2026 17:53:04 GMT, Sergey Bylokhov <[email protected]> wrote:
>> getSystemEventQueueImplPP() is a static method. >> So it may be called before the Toolkit is initialized. >> And I don't see the need to do this. No harm can come of leaving it, but no >> obvious good - and probable harm - will come from removing it. >> >> I have no reason to suppose any ordering problem here. > >>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. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/31262#discussion_r3312926880
