4#include "Stroika/Foundation/StroikaPreComp.h"
9#include "TimeOutException.h"
11#include "WaitableEvent.h"
45 if (WaitUntilQuietly (timeoutAt) == WaitStatus::eTimeout) {
48#if USE_NOISY_TRACE_IN_THIS_MODULE_
59#if USE_NOISY_TRACE_IN_THIS_MODULE_
63 unique_lock<mutex> lock{fConditionVariable.fMutex};
64 if (fConditionVariable.wait_until (lock, Time::Pin2SafeSeconds (timeoutAt), [
this] () { return fTriggered; })) [[likely]] {
65 return WaitStatus::eTriggered;
68 Assert (timeoutAt <= Time::GetTickCount ());
69 return WaitStatus::eTimeout;
78DISABLE_COMPILER_MSC_WARNING_START (4996);
79DISABLE_COMPILER_GCC_WARNING_START (
"GCC diagnostic ignored \"-Wdeprecated-declarations\"");
80DISABLE_COMPILER_CLANG_WARNING_START (
"clang diagnostic ignored \"-Wdeprecated-declarations\"");
81constexpr WaitableEvent::ResetType WaitableEvent::eAutoReset;
82constexpr WaitableEvent::ResetType WaitableEvent::eManualReset;
83DISABLE_COMPILER_MSC_WARNING_END (4996);
84DISABLE_COMPILER_GCC_WARNING_END (
"GCC diagnostic ignored \"-Wdeprecated-declarations\"");
85DISABLE_COMPILER_CLANG_WARNING_END (
"clang diagnostic ignored \"-Wdeprecated-declarations\"");
87#if qStroika_Foundation_Debug_AssertionsChecked || qStroika_FeatureSupported_Valgrind
90#if qExecution_WaitableEvent_SupportWaitForMultipleObjects
91 Require (fExtraWaitableEvents_.empty ());
98#if USE_NOISY_TRACE_IN_THIS_MODULE_
102#if qExecution_WaitableEvent_SupportWaitForMultipleObjects
103 [[maybe_unused]] lock_guard critSec{sExtraWaitableEventsMutex_};
104 for (
const auto& i : fExtraWaitableEvents_) {
time_point< RealtimeClock, DurationSeconds > TimePointSeconds
TimePointSeconds is a simpler approach to chrono::time_point, which doesn't require using templates e...
static const TimeOutException kThe
Duration is a chrono::duration<double> (=.
void CheckForInterruption()
void Throw(T &&e2Throw)
identical to builtin C++ 'throw' except that it does helpful, type dependent DbgTrace() messages firs...