aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-16 16:37:21 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-16 16:37:21 +0100
commitae845b49841275e30c07a216b049d9e22df48c42 (patch)
tree231b6a623649d861ff122968815001ad74e44590
parent27a34dddc2a4b88072f4bee33cc107f9cc3c7bc2 (diff)
downloadpaludis-ae845b49841275e30c07a216b049d9e22df48c42.tar.gz
paludis-ae845b49841275e30c07a216b049d9e22df48c42.tar.xz
Barf if no executives can run
-rw-r--r--paludis/util/executor.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/paludis/util/executor.cc b/paludis/util/executor.cc
index 68f3f1a..8433dae 100644
--- a/paludis/util/executor.cc
+++ b/paludis/util/executor.cc
@@ -23,6 +23,8 @@
#include <paludis/util/condition_variable.hh>
#include <paludis/util/thread.hh>
#include <paludis/util/make_shared_ptr.hh>
+#include <paludis/util/exception.hh>
+#include <paludis/util/stringify.hh>
#include <map>
#include <list>
@@ -139,7 +141,11 @@ Executor::execute()
}
if ((! any) && running.empty())
+ {
+ if (! _imp->queues.empty())
+ throw InternalError(PALUDIS_HERE, "None of our executives can start, but queues are not empty");
break;
+ }
_imp->condition.timed_wait(_imp->mutex, _imp->ms_update_interval / 1000, _imp->ms_update_interval % 1000);