Stroika Library 3.0d25
 
Loading...
Searching...
No Matches
Synchronized.cpp
1/*
2 * Copyright(c) Sophist Solutions, Inc. 1990-2026. All rights reserved
3 */
4#include "Stroika/Foundation/StroikaPreComp.h"
5
8#include "Stroika/Foundation/Execution/Exceptions.h"
9
10#include "Synchronized.h"
11
12using namespace Stroika::Foundation;
14using namespace Stroika::Foundation::Execution;
15using namespace Stroika::Foundation::Memory;
16
17#if qStroika_Foundation_Debug_DefaultTracingOn
18void Execution::Private_::DbgTraceHelper_ (const wchar_t* w1, const optional<std::wstring>& w2)
19{
20 if (w2) {
21 DbgTrace ("{}: {}"_f, w1, *w2);
22 }
23 else {
24 DbgTrace ("{}"_f, w1);
25 }
26}
27#endif
28
29/*
30 ********************************************************************************
31 ************************ Execution::Private_::ThrowTimeout_ ********************
32 ********************************************************************************
33 */
34void Execution::Private_::ThrowTimeout_ ()
35{
36 // Out-of-line purely so Synchronized.inl can declare it: Synchronized.h cannot include Exceptions.h, and
37 // every ThrowError () overload is inline, so a forward declaration of ThrowError would not link. A .cpp has
38 // no such problem. @see the declaration in Synchronized.inl.
39 ThrowError (errc::timed_out);
40}
#define DbgTrace
Definition Trace.h:327
void ThrowError(error_code ec)
throw a SystemErrorException with the given error_code - or std::bad_alloc for errc::not_enough_memor...