fortuna: add basic joinability check
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-01-12 03:41:24 +01:00
parent 767da88531
commit 643e7aabf6
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -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();
}
}