From 4ef56aa537f943fc378d00ec00dd32b0209729a7 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 25 Jul 2026 08:01:55 -0400 Subject: [PATCH] Add `const`. --- Concurrency/AsyncTaskQueue.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Concurrency/AsyncTaskQueue.hpp b/Concurrency/AsyncTaskQueue.hpp index aa88f7e34..9f13bba71 100644 --- a/Concurrency/AsyncTaskQueue.hpp +++ b/Concurrency/AsyncTaskQueue.hpp @@ -102,7 +102,7 @@ public: } /// @returns The number of items currently enqueued. - size_t size() { + size_t size() const { const std::lock_guard guard(condition_mutex_); return actions_.size(); } @@ -230,7 +230,7 @@ private: // Necessary synchronisation parts. std::atomic_flag should_quit_; - std::mutex condition_mutex_; + mutable std::mutex condition_mutex_; std::condition_variable condition_; // Ensure the thread isn't constructed until after the mutex