summaryrefslogtreecommitdiffstats
path: root/include/framework/scheduling/FIFOScheduler.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/framework/scheduling/FIFOScheduler.h')
-rw-r--r--include/framework/scheduling/FIFOScheduler.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/framework/scheduling/FIFOScheduler.h b/include/framework/scheduling/FIFOScheduler.h
index 7cb6d20..4c1db8d 100644
--- a/include/framework/scheduling/FIFOScheduler.h
+++ b/include/framework/scheduling/FIFOScheduler.h
@@ -82,6 +82,7 @@ private:
std::atomic<size_t> m_counter;
std::mutex m_cv_lock;
std::condition_variable m_cv;
+ std::mutex m_queue_lock;
std::thread m_sched_thrd;
std::thread m_sched_wakeup_thrd;
@@ -102,6 +103,7 @@ private:
}
void schedule_next() {
+ auto lk = std::unique_lock<std::mutex>(m_queue_lock);
assert(m_task_queue.size() > 0);
auto t = m_task_queue.pop();
m_stats.job_scheduled(t.m_timestamp);