accumulator: make reg bool atomic
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-01-22 21:39:45 +01:00
parent 9f95ebe3b1
commit 3bf79b49fd
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -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(),