fortuna: add basic joinability check
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
767da88531
commit
643e7aabf6
12
fortuna.cpp
12
fortuna.cpp
|
@ -29,9 +29,15 @@ Fortuna::Fortuna() {
|
|||
th_sfm = std::thread(&Fortuna::seed_file_manager_service, this);
|
||||
}
|
||||
Fortuna::~Fortuna() noexcept {
|
||||
th_gen.join();
|
||||
th_accu.join();
|
||||
th_sfm.join();
|
||||
if (th_gen.joinable()) {
|
||||
th_gen.join();
|
||||
}
|
||||
if (th_gen.joinable()) {
|
||||
th_accu.join();
|
||||
}
|
||||
if (th_sfm.joinable()) {
|
||||
th_sfm.join();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Reference in New Issue