From 0b4e6114c3c2c0298fb1232385689b2ccfbabeb7 Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Thu, 2 Jun 2022 19:08:07 +0200 Subject: [PATCH] Remove unnecessary synchronized keyword from GlobalExecQueue --- src/main/java/com/yes/yes/utils/GlobalExecQueue.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/yes/yes/utils/GlobalExecQueue.java b/src/main/java/com/yes/yes/utils/GlobalExecQueue.java index 8fbcd87..a7ec16d 100644 --- a/src/main/java/com/yes/yes/utils/GlobalExecQueue.java +++ b/src/main/java/com/yes/yes/utils/GlobalExecQueue.java @@ -22,9 +22,7 @@ public class GlobalExecQueue { Semaphore s = new Semaphore(0); Platform.runLater(() -> { while (queue.size() > 0) { - synchronized (GlobalExecQueue.class) { - Objects.requireNonNull(queue.poll()).run(); - } + Objects.requireNonNull(queue.poll()).run(); } s.release(); });