From e5418063a31eec06835f294ec6e1054ea42f846d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Tue, 28 Feb 2012 14:24:22 +0100 Subject: Correct handling of Thread.interrupted(). --- same/src/main/java/com/orbekk/same/VariableUpdaterTask.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'same') diff --git a/same/src/main/java/com/orbekk/same/VariableUpdaterTask.java b/same/src/main/java/com/orbekk/same/VariableUpdaterTask.java index 44f63fe..471dbc6 100644 --- a/same/src/main/java/com/orbekk/same/VariableUpdaterTask.java +++ b/same/src/main/java/com/orbekk/same/VariableUpdaterTask.java @@ -35,6 +35,9 @@ public class VariableUpdaterTask extends Thread } private synchronized void waitFor(AtomicBoolean v) { + if (Thread.interrupted()) { + return; + } while(!v.get()) { try { wait(); -- cgit v1.2.3