wait for remaining build tasks to finish

master
Daniel Kolesa 2017-06-13 20:26:14 +02:00
parent 3a3f417181
commit 31eafed8d2
1 changed files with 14 additions and 4 deletions

18
main.cc
View File

@ -157,10 +157,20 @@ struct ob_state: cs_state {
throw;
}
waiting.pop();
while (!waits.empty()) {
/* TODO: wait for unfinished tasks */
waits.front().get();
waits.pop();
for (; !waits.empty(); waits.pop()) {
try {
waits.front().get();
} catch (build_error const &) {
waits.pop();
for (; !waits.empty(); waits.pop()) {
try {
waits.front().get();
} catch (build_error const &) {
/* no rethrow */
}
}
throw;
}
}
}