From e0674ff95793fccf9384f244a3b642e7b081c948 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sat, 15 Jun 2019 21:12:50 -1000 Subject: [PATCH] Made two variables atomic to be safe --- lib/graphicsdev/Common.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/graphicsdev/Common.hpp b/lib/graphicsdev/Common.hpp index 5008664..73c2636 100644 --- a/lib/graphicsdev/Common.hpp +++ b/lib/graphicsdev/Common.hpp @@ -213,11 +213,11 @@ class PipelineCompileQueue { }; std::queue m_tasks; - size_t m_outstandingTasks = 0; + std::atomic_size_t m_outstandingTasks = 0; std::vector m_threads; std::mutex m_mt; std::condition_variable m_cv, m_backcv; - bool m_running = true; + std::atomic_bool m_running = true; void worker() { std::unique_lock lk(m_mt);