From c783614cba6f72a944c75c5b71d988722b3c334f Mon Sep 17 00:00:00 2001 From: vraskulin Date: Mon, 20 Mar 2017 15:17:30 +0300 Subject: [PATCH] NotifyAll --- .../client/unusedFiles/DelayedViewerThread.java | 2 +- .../java/mage/client/game/StartMultiGamesTest.java | 2 +- .../src/mage/player/human/HumanPlayer.java | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Mage.Client/src/main/java/mage/client/unusedFiles/DelayedViewerThread.java b/Mage.Client/src/main/java/mage/client/unusedFiles/DelayedViewerThread.java index 851bffeabe..89976b2669 100644 --- a/Mage.Client/src/main/java/mage/client/unusedFiles/DelayedViewerThread.java +++ b/Mage.Client/src/main/java/mage/client/unusedFiles/DelayedViewerThread.java @@ -24,7 +24,7 @@ public class DelayedViewerThread extends Thread { public synchronized void show(Component component, long delay) { delayedViewers.put(component, System.currentTimeMillis() + delay); - notify(); + notifyAll(); } public synchronized void hide(Component component) { diff --git a/Mage.Client/src/test/java/mage/client/game/StartMultiGamesTest.java b/Mage.Client/src/test/java/mage/client/game/StartMultiGamesTest.java index 10e2d072f9..f5dea6e8c5 100644 --- a/Mage.Client/src/test/java/mage/client/game/StartMultiGamesTest.java +++ b/Mage.Client/src/test/java/mage/client/game/StartMultiGamesTest.java @@ -48,7 +48,7 @@ public class StartMultiGamesTest { synchronized (sync) { frame = new MageFrame(); frame.setVisible(true); - sync.notify(); + sync.notifyAll(); } }); synchronized (sync) { diff --git a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java index 6fe57b2d0a..3c11dbc587 100644 --- a/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java +++ b/Mage.Server.Plugins/Mage.Player.Human/src/mage/player/human/HumanPlayer.java @@ -1407,7 +1407,7 @@ public class HumanPlayer extends PlayerImpl { public void setResponseString(String responseString) { synchronized (response) { response.setString(responseString); - response.notify(); + response.notifyAll(); logger.debug("Got response string from player: " + getId()); } } @@ -1417,7 +1417,7 @@ public class HumanPlayer extends PlayerImpl { synchronized (response) { response.setManaType(manaType); response.setResponseManaTypePlayerId(manaTypePlayerId); - response.notify(); + response.notifyAll(); logger.debug("Got response mana type from player: " + getId()); } } @@ -1426,7 +1426,7 @@ public class HumanPlayer extends PlayerImpl { public void setResponseUUID(UUID responseUUID) { synchronized (response) { response.setUUID(responseUUID); - response.notify(); + response.notifyAll(); logger.debug("Got response UUID from player: " + getId()); } } @@ -1435,7 +1435,7 @@ public class HumanPlayer extends PlayerImpl { public void setResponseBoolean(Boolean responseBoolean) { synchronized (response) { response.setBoolean(responseBoolean); - response.notify(); + response.notifyAll(); logger.debug("Got response boolean from player: " + getId()); } } @@ -1444,7 +1444,7 @@ public class HumanPlayer extends PlayerImpl { public void setResponseInteger(Integer responseInteger) { synchronized (response) { response.setInteger(responseInteger); - response.notify(); + response.notifyAll(); logger.debug("Got response integer from player: " + getId()); } } @@ -1453,7 +1453,7 @@ public class HumanPlayer extends PlayerImpl { public void abort() { abort = true; synchronized (response) { - response.notify(); + response.notifyAll(); logger.debug("Got cancel action from player: " + getId()); } } @@ -1462,7 +1462,7 @@ public class HumanPlayer extends PlayerImpl { public void skip() { synchronized (response) { response.setInteger(0); - response.notify(); + response.notifyAll(); logger.debug("Got skip action from player: " + getId()); } }