pool: make all_ok 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
e452a63b4a
commit
9f95ebe3b1
3
pool.cpp
3
pool.cpp
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
#include <fmt/core.h>
|
#include <fmt/core.h>
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
#include <climits>
|
#include <climits>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
@ -34,7 +35,7 @@ auto Pool::add_entropy(const unsigned int& source,
|
|||||||
const size_t event_size{sizeof(char) * event.size()};
|
const size_t event_size{sizeof(char) * event.size()};
|
||||||
const size_t max_event_size{32};
|
const size_t max_event_size{32};
|
||||||
std::string event_str;
|
std::string event_str;
|
||||||
bool all_ok{false};
|
std::atomic<bool> all_ok{false};
|
||||||
|
|
||||||
fmt::print("\tevent_size (bytes): {}\n", event_size);
|
fmt::print("\tevent_size (bytes): {}\n", event_size);
|
||||||
try {
|
try {
|
||||||
|
Reference in New Issue
Block a user