From 52348ef11c21e383ea3b59c2d3e78f68e0adf805 Mon Sep 17 00:00:00 2001 From: kelson42 Date: Sat, 7 Apr 2012 20:48:55 +0000 Subject: [PATCH] + fix different stuff related to the new indexer --- src/common/kiwix/indexer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/kiwix/indexer.cpp b/src/common/kiwix/indexer.cpp index fb6bcdee7..941f4df1b 100644 --- a/src/common/kiwix/indexer.cpp +++ b/src/common/kiwix/indexer.cpp @@ -159,7 +159,7 @@ namespace kiwix { } /* Test if the thread should be cancelled */ - pthread_testcancel(); + pthread_testcancel(); } self->articleParserRunning(false); @@ -265,6 +265,7 @@ namespace kiwix { bool Indexer::popFromToParseQueue(indexerToken &token) { while (this->isToParseQueueEmpty() && this->isArticleExtractorRunning()) { sleep(0.5); + pthread_testcancel(); } if (!this->isToParseQueueEmpty()) { @@ -297,6 +298,7 @@ namespace kiwix { bool Indexer::popFromToIndexQueue(indexerToken &token) { while (this->isToIndexQueueEmpty() && this->isArticleParserRunning()) { sleep(0.5); + pthread_testcancel(); } if (!this->isToIndexQueueEmpty()) {