interrupt before wait sleep so haltWatchers is more likely to return after watchThrea...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 15 Mar 2007 14:50:42 +0000 (14:50 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 15 Mar 2007 14:50:42 +0000 (14:50 +0000)
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

index f0af3d4..d1b2592 100644 (file)
@@ -47,8 +47,8 @@ public class VamsasFileWatcherThread extends Thread {
     // wait arount for WATCH_SLEEP milliseconds before returning\r
     // in the hope that the watcher loop has stopped\r
     try {\r
-      long time = System.currentTimeMillis()+WATCH_SLEEP;\r
       interrupt();\r
+      long time = System.currentTimeMillis()+WATCH_SLEEP;\r
       while (running && time>System.currentTimeMillis()) {\r
         Thread.sleep(1);\r
       }\r