5#include <yaclib_std/thread>
17 yaclib_std::this_thread::yield();
18#elif defined(_MSC_VER)
19 yaclib_std::this_thread::yield();
26bool Injector::NeedInject()
noexcept {
30 if (_count.fetch_add(1, std::memory_order_relaxed) >=
sYieldFrequency) {
58 return _count.load(std::memory_order_relaxed);
62 _count.store(
state, std::memory_order_relaxed);
std::uint32_t GetState() const noexcept
void SetState(std::uint32_t state) noexcept
static void SetSleepTime(std::uint32_t ns) noexcept
static std::uint32_t GetSleepTime() noexcept
static std::uint64_t GetInjectedCount() noexcept
void MaybeInject() noexcept
static void SetFrequency(std::uint32_t freq) noexcept
static std::uint32_t sYieldFrequency
static std::uint64_t sInjectedCount
std::uint64_t GetRandNumber(std::uint64_t max)
static std::uint32_t sSleepTime
Contract< V, E > MakeContract()
Creates related future and promise.