diff --git a/CMakeLists.txt b/CMakeLists.txt index a82f75c..57b8949 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.25) -project(blt-gp VERSION 0.0.89) +project(blt-gp VERSION 0.0.90) include(CTest) diff --git a/include/blt/gp/program.h b/include/blt/gp/program.h index 6bbdeaf..f642373 100644 --- a/include/blt/gp/program.h +++ b/include/blt/gp/program.h @@ -501,13 +501,18 @@ namespace blt::gp thread_execution_service = nullptr; delete cpy; } + + void kill() + { + thread_helper.lifetime_over = true; + } private: type_provider& system; operator_storage storage; population_t current_pop; - population_stats current_stats {}; + population_stats current_stats{}; population_t next_pop; std::atomic_uint64_t current_generation = 0; @@ -519,7 +524,7 @@ namespace blt::gp std::vector> threads; std::mutex thread_function_control; - std::condition_variable thread_function_condition {}; + std::condition_variable thread_function_condition{}; std::atomic_uint64_t evaluation_left = 0;