add kill
parent
8e5a3f3b7c
commit
5d72923998
|
@ -1,5 +1,5 @@
|
||||||
cmake_minimum_required(VERSION 3.25)
|
cmake_minimum_required(VERSION 3.25)
|
||||||
project(blt-gp VERSION 0.0.89)
|
project(blt-gp VERSION 0.0.90)
|
||||||
|
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
|
||||||
|
|
|
@ -502,12 +502,17 @@ namespace blt::gp
|
||||||
delete cpy;
|
delete cpy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void kill()
|
||||||
|
{
|
||||||
|
thread_helper.lifetime_over = true;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
type_provider& system;
|
type_provider& system;
|
||||||
|
|
||||||
operator_storage storage;
|
operator_storage storage;
|
||||||
population_t current_pop;
|
population_t current_pop;
|
||||||
population_stats current_stats {};
|
population_stats current_stats{};
|
||||||
population_t next_pop;
|
population_t next_pop;
|
||||||
std::atomic_uint64_t current_generation = 0;
|
std::atomic_uint64_t current_generation = 0;
|
||||||
|
|
||||||
|
@ -519,7 +524,7 @@ namespace blt::gp
|
||||||
std::vector<std::unique_ptr<std::thread>> threads;
|
std::vector<std::unique_ptr<std::thread>> threads;
|
||||||
|
|
||||||
std::mutex thread_function_control;
|
std::mutex thread_function_control;
|
||||||
std::condition_variable thread_function_condition {};
|
std::condition_variable thread_function_condition{};
|
||||||
|
|
||||||
std::atomic_uint64_t evaluation_left = 0;
|
std::atomic_uint64_t evaluation_left = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue