Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
added more interruptions in DidYouMean because that was the cause for some blockings during search
Michael Peter Christen125d47b3c178
diff --git a/source/de/anomic/data/DidYouMean.java b/source/de/anomic/data/DidYouMean.javaindex a15b1c339..a3331014e 100644--- a/source/de/anomic/data/DidYouMean.java+++ b/source/de/anomic/data/DidYouMean.java@@ -275,7 +275,9 @@ public class DidYouMean {// we take guessLib entries as long as there is any entry in it// to see if this is the case, we must wait for termination of the producerfor (final Thread t: producers) {- try { t.join(); } catch (final InterruptedException e) {}+ if (this.timeLimit > System.currentTimeMillis()) try {+ t.join(Math.max(0, this.timeLimit - System.currentTimeMillis()));+ } catch (final InterruptedException e) {}}// if there is not any entry in guessLib, then transfer all entries from the@@ -297,7 +299,9 @@ public class DidYouMean {// wait for termination of consumerfor (final Consumer c: consumers) {- try { c.join(); } catch (final InterruptedException e) {}+ if (this.timeLimit > System.currentTimeMillis()) try {+ c.join(Math.max(0, this.timeLimit - System.currentTimeMillis()));+ } catch (final InterruptedException e) {}}// we don't want the given word in the result