From 932e9b465717fde171ef6cf7f70d55be846a4435 Mon Sep 17 00:00:00 2001 From: jprocter Date: Thu, 15 Mar 2007 14:50:42 +0000 Subject: [PATCH] interrupt before wait sleep so haltWatchers is more likely to return after watchThread has stopped. git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@362 be28352e-c001-0410-b1a7-c7978e42abec --- src/uk/ac/vamsas/client/simpleclient/VamsasFileWatcherThread.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uk/ac/vamsas/client/simpleclient/VamsasFileWatcherThread.java b/src/uk/ac/vamsas/client/simpleclient/VamsasFileWatcherThread.java index f0af3d4..d1b2592 100644 --- a/src/uk/ac/vamsas/client/simpleclient/VamsasFileWatcherThread.java +++ b/src/uk/ac/vamsas/client/simpleclient/VamsasFileWatcherThread.java @@ -47,8 +47,8 @@ public class VamsasFileWatcherThread extends Thread { // wait arount for WATCH_SLEEP milliseconds before returning // in the hope that the watcher loop has stopped try { - long time = System.currentTimeMillis()+WATCH_SLEEP; interrupt(); + long time = System.currentTimeMillis()+WATCH_SLEEP; while (running && time>System.currentTimeMillis()) { Thread.sleep(1); } -- 1.7.10.2