From dbb72034d9f8d8bd31e8dd380a1dc1c883c659fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Fri, 2 Aug 2024 19:41:18 +0200 Subject: [PATCH] Use normal atomic in `thread_pool` --- nano/core_test/utility.cpp | 1 + nano/lib/thread_pool.hpp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nano/core_test/utility.cpp b/nano/core_test/utility.cpp index 730714dc8..791a89d10 100644 --- a/nano/core_test/utility.cpp +++ b/nano/core_test/utility.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include diff --git a/nano/lib/thread_pool.hpp b/nano/lib/thread_pool.hpp index b8eb29f9c..f6346c542 100644 --- a/nano/lib/thread_pool.hpp +++ b/nano/lib/thread_pool.hpp @@ -1,6 +1,5 @@ #pragma once -#include #include #include @@ -44,7 +43,7 @@ private: std::atomic stopped{ false }; unsigned num_threads; std::unique_ptr thread_pool_m; - nano::relaxed_atomic_integral num_tasks{ 0 }; + std::atomic num_tasks{ 0 }; /** Set the names of all the threads in the thread pool for easier identification */ std::latch thread_names_latch;