YACLib
C++ library for concurrent tasks execution
Loading...
Searching...
No Matches
atomic.cpp
Go to the documentation of this file.
1#include <fault/util.hpp>
2
4
5#include <atomic>
6
7namespace yaclib::detail {
8
9static std::uint32_t sAtomicFailFrequency = 13;
10
13 return freq != 0 && GetRandNumber(freq) == 0;
14}
15
16void SetAtomicWeakFailFrequency(std::uint32_t k) {
18}
19
20} // namespace yaclib::detail
std::uint64_t GetRandNumber(std::uint64_t max)
Definition util.cpp:22
static std::uint32_t sAtomicFailFrequency
Definition atomic.cpp:9
void SetAtomicWeakFailFrequency(std::uint32_t k)
Definition atomic.cpp:16
bool ShouldFailAtomicWeak()
Definition atomic.cpp:11
Contract< V, E > MakeContract()
Creates related future and promise.
Definition contract.hpp:25