8305666: Add system property for fair AWT lock

Reviewed-by: prr
This commit is contained in:
Nikita Gubarkov 2023-04-07 10:06:51 +00:00 committed by Alexey Ushakov
parent c67bbcea92
commit dc81603cbf

View File

@ -231,7 +231,9 @@ public abstract class SunToolkit extends Toolkit
* }
*/
private static final ReentrantLock AWT_LOCK = new ReentrantLock();
@SuppressWarnings("removal")
private static final ReentrantLock AWT_LOCK = new ReentrantLock(
AccessController.doPrivileged(new GetBooleanAction("awt.lock.fair")));
private static final Condition AWT_LOCK_COND = AWT_LOCK.newCondition();
public static final void awtLock() {