Skip to content

Commit

Permalink
8305666: Add system property for fair AWT lock
Browse files Browse the repository at this point in the history
Reviewed-by: prr
  • Loading branch information
YaaZ authored and Alexey Ushakov committed Apr 7, 2023
1 parent c67bbce commit dc81603
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/java.desktop/share/classes/sun/awt/SunToolkit.java
Expand Up @@ -231,7 +231,9 @@ public abstract KeyboardFocusManagerPeer getKeyboardFocusManagerPeer()
* }
*/

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() {
Expand Down

1 comment on commit dc81603

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.