From b19720548aceab079102d2e5f3bb1004415077d7 Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Tue, 23 Feb 2016 23:28:49 +0100 Subject: [PATCH] Fix program hanging in release. That great idea of spawning a thread for printing to stdout is firing back. Temporary fix to get past, but the output looks really broken now. --- src/scan/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/scan/main.cpp b/src/scan/main.cpp index 1b0532f..561598c 100644 --- a/src/scan/main.cpp +++ b/src/scan/main.cpp @@ -170,8 +170,9 @@ namespace { std::size_t clear_size = 0; const auto digit_count = static_cast(std::log10(static_cast(total_items))) + 1; do { - std::unique_lock lk(progress_print); - parIndexer.step_notify().wait(lk); + //TODO: fix this steaming pile of crap + //std::unique_lock lk(progress_print); + //parIndexer.step_notify().wait(lk); std::cout << '\r'; std::fill_n(cout_iterator(std::cout), clear_size, ' '); std::cout << '\r'; @@ -186,7 +187,7 @@ namespace { std::cout << msg; std::cout.flush(); } - } while (parIndexer.processed_items() != total_items); + } while (false); //parIndexer.processed_items() != total_items); hash_thread.join(); if (parIndexer.processed_items() > 0) {