hack to minimise IO interruption when SimpleClient.finalize() is called whilst docume...
authorjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 27 Sep 2007 13:06:28 +0000 (13:06 +0000)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Thu, 27 Sep 2007 13:06:28 +0000 (13:06 +0000)
git-svn-id: https://svn.lifesci.dundee.ac.uk/svn/repository/trunk@481 be28352e-c001-0410-b1a7-c7978e42abec

src/uk/ac/vamsas/client/simpleclient/EventGeneratorThread.java
src/uk/ac/vamsas/client/simpleclient/VamsasFileWatcherThread.java

index b9824b5..d00e119 100644 (file)
@@ -330,7 +330,10 @@ public class EventGeneratorThread {
 
   public void interruptWatching() {
     if (watchThread!=null && watchThread.isAlive())
+    {
+      // TODO: find a way of interrupting watcher in a way that prevents file IO being interrupted
       watchThread.interrupt();
+    }
     
   }
   /**
index d1b2592..56a0440 100644 (file)
@@ -89,4 +89,12 @@ public class VamsasFileWatcherThread extends Thread {
     log.debug("Finishing WatcherThread poll loop");\r
     running=false;\r
   }\r
+  /* (non-Javadoc)\r
+   * @see java.lang.Thread#interrupt()\r
+   */\r
+  public void interrupt() {\r
+    // TODO: make thread gracefully interrupt watchers so that any handlers finish doing what they were doing\r
+    // super.interrupt();\r
+  }\r
+  \r
 }\r