accumulator: make reg bool atomic
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
9f95ebe3b1
commit
3bf79b49fd
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
@ -54,7 +55,7 @@ auto Accumulator::_p_pools_equal(
|
|||
|
||||
// check if given source id is an id of an already registered entropy source
|
||||
auto Accumulator::src_is_registered(const uint8_t& id) -> bool {
|
||||
bool reg{false};
|
||||
std::atomic<bool> reg{false};
|
||||
static uint8_t _src_id{};
|
||||
|
||||
if (std::any_of(this->entropy_sources.begin(),
|
||||
|
|
Reference in New Issue