Print matches while still searching.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Previously we printed the matches at the end.
This commit is contained in:
parent
59759b5934
commit
4df7b36dfc
|
@ -204,6 +204,14 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
futurepool.emplace_back(
|
||||
std::async(std::launch::async, search_file, filepath));
|
||||
|
||||
if (!matches_all.empty())
|
||||
{
|
||||
output::print_matches(matches_all[0], opts,
|
||||
input_files.size() == 1);
|
||||
std::lock_guard<std::mutex> guard(mutex_matches_all);
|
||||
matches_all.erase(matches_all.begin());
|
||||
}
|
||||
}
|
||||
futures_cleanup(true);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user