summaryrefslogtreecommitdiff
path: root/src/core/job.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-11-25 15:22:41 +0100
committerLennart Poettering <lennart@poettering.net>2013-11-25 17:40:53 +0100
commit752b590500cdfe8e60800c0553bf7ae3ac613ffd (patch)
tree5bced57233c5d92b7c684e2ed649dadf11594071 /src/core/job.c
parent844de4355592259eebcffddfc38c63266e451cb6 (diff)
core: dispatch run queue only if there's nothing else to do
Always read all external events before we decide what we do next.
Diffstat (limited to 'src/core/job.c')
-rw-r--r--src/core/job.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/job.c b/src/core/job.c
index f791299a9d..9cd6ce24b8 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -874,6 +874,9 @@ void job_add_to_run_queue(Job *j) {
if (j->in_run_queue)
return;
+ if (!j->manager->run_queue)
+ sd_event_source_set_enabled(j->manager->run_queue_event_source, SD_EVENT_ONESHOT);
+
LIST_PREPEND(run_queue, j->manager->run_queue, j);
j->in_run_queue = true;
}