Skip to content

Commit

Permalink
*) Adding timeouts for shutdown
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@223 6c8d7289-2bf4-0310-a012-ef5d649a1542
  • Loading branch information
theli committed Jun 8, 2005
1 parent ef68517 commit 83b41ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion source/de/anomic/plasma/plasmaCrawlLoader.java
Expand Up @@ -141,7 +141,8 @@ public void close() {
this.interrupt();

// waiting for the thread to finish ...
this.join();
this.log.logInfo("Waiting for plasmaCrawlLoader shutdown ...");
this.join(5000);
} catch (Exception e) {
// we where interrupted while waiting for the crawlLoader Thread to finish
}
Expand Down
2 changes: 1 addition & 1 deletion source/de/anomic/server/serverAbstractThread.java
Expand Up @@ -147,7 +147,7 @@ public void terminate(boolean waitFor) {
// wait for termination
if (waitFor) {
// Busy waiting removed: while (this.isAlive()) try {this.sleep(100);} catch (InterruptedException e) {break;}
try { this.join(); } catch (InterruptedException e) {return;}
try { this.join(3000); } catch (InterruptedException e) {return;}
}

// If we reach this point, the process is closed
Expand Down

0 comments on commit 83b41ef

Please sign in to comment.