Fix bug where some Indexer work may get thrown away.

This commit is contained in:
casey 2020-07-01 15:57:24 -07:00
parent b39000927a
commit 0300eccbf1

View File

@ -622,7 +622,7 @@ void Indexer::ThreadLoop() {
/* done with sync, remove all the threads in the pool to free resources. they'll /* done with sync, remove all the threads in the pool to free resources. they'll
be re-created later if we index again. */ be re-created later if we index again. */
io.stop(); io.post([&io]() { io.stop(); });
threadPool.join_all(); threadPool.join_all();
} }
else { else {