diff options
author | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-02-28 14:24:22 +0100 |
---|---|---|
committer | Kjetil Ørbekk <kjetil.orbekk@gmail.com> | 2012-02-28 14:24:37 +0100 |
commit | e5418063a31eec06835f294ec6e1054ea42f846d (patch) | |
tree | b985dd4ec665b05ad5cb06fa8773a3cfb20611de /same/src | |
parent | 7be826174d1837629c0ad33c7b6d4dfb3bc63a47 (diff) |
Correct handling of Thread.interrupted().
Diffstat (limited to 'same/src')
-rw-r--r-- | same/src/main/java/com/orbekk/same/VariableUpdaterTask.java | 3 |
1 files changed, 3 insertions, 0 deletions
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<T> extends Thread } private synchronized void waitFor(AtomicBoolean v) { + if (Thread.interrupted()) { + return; + } while(!v.get()) { try { wait(); |