diff options
| author | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2021-07-28 17:04:39 +0300 |
|---|---|---|
| committer | Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> | 2021-07-28 17:04:39 +0300 |
| commit | 7fa80f77e9913faa24900cbf83548f56c3491657 (patch) | |
| tree | d9434d225ba55a6cd2a5756485dfee6c6fb6185d | |
| parent | f58320784277d71d3cfdf75ce9cfc45d1dc2a78a (diff) | |
index: don't assume very fast machine cfg drive
The scanner had a timeout for scanning, which doesn't work too well with
machine with rel. fast disks / rel. slow machines. Which I don't happen
to have!
Let's remove the timeout, should help with getting unwanted timeouts
which would cut short the indexing.
| -rw-r--r-- | lib/index/mu-indexer.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/index/mu-indexer.cc b/lib/index/mu-indexer.cc index fc227d2..0976608 100644 --- a/lib/index/mu-indexer.cc +++ b/lib/index/mu-indexer.cc @@ -275,11 +275,10 @@ Indexer::Private::start(const Indexer::Config& conf) { // now there may still be messages in the work queue... - // finish those, but only for a while. - const auto start{std::chrono::steady_clock::now()}; - while (!fq_.empty() && std::chrono::steady_clock::now() - start < 10s) { + // finish those; this is a bit ugly; perhaps we should + // handle SIGTERM etc. + while (!fq_.empty()) std::this_thread::sleep_for(100ms); - } } if (!fq_.empty()) { |
