From 593e02b6ffd36cfabda85e9dcfd88ec60b8a8741 Mon Sep 17 00:00:00 2001 From: Brett Date: Tue, 6 Aug 2024 03:51:49 -0400 Subject: [PATCH] make the flag bool atomic --- CMakeLists.txt | 2 +- include/blt/gp/program.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3403fc6..5aef8e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(blt-gp VERSION 0.0.119) +project(blt-gp VERSION 0.0.120) include(CTest) diff --git a/include/blt/gp/program.h b/include/blt/gp/program.h index d818ed5..16092cc 100644 --- a/include/blt/gp/program.h +++ b/include/blt/gp/program.h @@ -541,7 +541,7 @@ namespace blt::gp population_stats current_stats{}; population_t next_pop; std::atomic_uint64_t current_generation = 0; - bool fitness_should_exit = false; + std::atomic_bool fitness_should_exit = false; blt::u64 seed; prog_config_t config{};