diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2025-01-31 16:16:28 -0500 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2025-01-31 16:16:28 -0500 |
| commit | 3061bfbf1c4b5092fa4234de3105a615fcef18ea (patch) | |
| tree | 4c41cdf3b8e3af6e38ba1c8f283d2e35086cc2af /include/framework/scheduling/FIFOScheduler.h | |
| parent | 30da48151f58803968ca3ef5d42e66a9223d80a4 (diff) | |
| download | dynamic-extension-3061bfbf1c4b5092fa4234de3105a615fcef18ea.tar.gz | |
More updates
Diffstat (limited to 'include/framework/scheduling/FIFOScheduler.h')
| -rw-r--r-- | include/framework/scheduling/FIFOScheduler.h | 2 |
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); |