diff options
-rw-r--r-- | build2/scheduler.txx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/build2/scheduler.txx b/build2/scheduler.txx index 3410b6f..684409c 100644 --- a/build2/scheduler.txx +++ b/build2/scheduler.txx @@ -70,14 +70,15 @@ namespace build2 size_t om (m); m = task_queue_depth_; + ql.unlock (); + forward<F> (f) (forward<A> (a)...); // Should not throw. + + if (om != task_queue_depth_) { - ql.unlock (); - forward<F> (f) (forward<A> (a)...); // Should not throw. ql.lock (); + m = s == 0 ? t : om; } - m = s == 0 ? t : om; - return false; } } |