atomic use count

v1
Brett 2024-08-17 19:55:55 -04:00
parent 941aa6809c
commit 97990401e2
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.20) cmake_minimum_required(VERSION 3.20)
include(cmake/color.cmake) include(cmake/color.cmake)
set(BLT_VERSION 0.18.34) set(BLT_VERSION 0.18.35)
set(BLT_TEST_VERSION 0.0.1) set(BLT_TEST_VERSION 0.0.1)
set(BLT_TARGET BLT) set(BLT_TARGET BLT)

View File

@ -94,7 +94,7 @@ namespace blt
private: private:
blt::size_t thread_count; blt::size_t thread_count;
blt::size_t threads_waiting; blt::size_t threads_waiting;
blt::size_t use_count; std::atomic_uint64_t use_count;
std::optional<std::reference_wrapper<std::atomic_bool>> exit_cond; std::optional<std::reference_wrapper<std::atomic_bool>> exit_cond;
std::mutex count_mutex; std::mutex count_mutex;
std::condition_variable cv; std::condition_variable cv;