8#if !defined(ALIB_C20_MODULES) || ((ALIB_C20_MODULES != 0) && (ALIB_C20_MODULES != 1))
9# error "Symbol ALIB_C20_MODULES has to be given to the compiler as either 0 or 1"
26#if !ALIB_SINGLE_THREADED && ALIB_DEBUG
40"Multi-Threading {} in Lock \"{}\"" "\n"
42" In (Member-)Function: {}" "\n"
43" Is Owned: {} ({})" "\n"
45" Called By: {}::{}" "\n"
49" Latest Acquisition By: {}::{}" "\n"
52" Latest Release By: {}:{}" "\n"
58"Multi-Threading {} in Shared-Lock \"{}\"" "\n"
60" In (Member-)Function: {}" "\n"
61" Is Owned: {} ({})" "\n"
62" Is Shared Owned: {} ({})" "\n"
64" Called By: {}::{}" "\n"
68" Latest Acquisition By: {}::{}" "\n"
71" Latest Release By: {}::{}" "\n"
75" Latest Shared Acquisition By: {}::{}" "\n"
78" Latest SharedRelease By: {}::{}" "\n"
85 const char* headline ) {
87 (type== 0 ?
"Assertion" :
"Warning"),
99 const char* headline ) {
101 (type== 0 ?
"Assertion" :
"Warning"),
116"Assertion failed in method TCondition::{}" "\n"
120" Called By: {}::{}" "\n"
124" Current Owner: {}" "\n"
125" #Of Waiters: {}" "\n"
126" Exclusive Waiter: {}" "\n"
128" Latest Acquisition By: {}::{}" "\n"
131" Latest Release By: {}::{}" "\n"
135" Latest Wait By: {}::{}" "\n"
138" Latest Notify By: {}::{}" "\n"
144 const char* headline ) {
162 DoAssert( 0, assertCI, requestCI,
"Already (still) owned." );
170 " Warning limit can be adopted with field DbgRecursionWarningThreshold";
174 msg+=
" recursive acquisitions."
175 " Warning limit can be adopted with field DbgRecursionWarningThreshold";
static ALIB_DLL Thread * Get(std::thread::id nativeID)
void Raise(const lang::CallerInfo &ci, int type, std::string_view domain, TArgs &&... args)
strings::TAString< nchar, lang::HeapAllocator > NAString
Type alias in namespace alib.
lang::CallerInfo CallerInfo
Type alias in namespace alib.
const char * File
The name of the source file as given by compiler.
const std::type_info * TypeInfo
The calling type.
int Line
The line number within File.
std::thread::id ThreadID
The ID of the calling thread.
std::thread::id AssertExclusiveWaiter
ALIB_DLL void Assert(bool cond, const CallerInfo &assertCI, const CallerInfo &ci, const char *headline)
CallerInfo NotifyCI
The most recent call to ReleaseAndNotify or.
const character * Name
The name of this instance.
static ALIB_DLL const char * ASSERTION_FORMAT
CallerInfo RelCI
Source location of the most recent release.
Thread * Owner
Tracks the current owner.
std::atomic< int > CntWaiters
The number of currently waiting threads.
CallerInfo AcqCI
Source location of the most recent acquirement.
CallerInfo WaitCI
The most recent call to WaitForNotification.
static ALIB_DLL const char * ASSERTION_FORMAT
CallerInfo RelCI
Source location of the most recent release.
virtual ALIB_DLL void DoAssert(int type, const CallerInfo &assertCI, const CallerInfo &ci, const char *headline)
ALIB_DLL Thread * GetOwner() const
std::atomic< int > CntAcquirements
The number of shared acquirements.
ALIB_DLL void SetRecursiveOwner(const CallerInfo &assertCI, const CallerInfo &requestCI)
CallerInfo AcqCI
Source location of the most recent acquirement.
CallerInfo SAcqCI
The most recent shared acquirement's caller.
ALIB_DLL void DoAssert(int type, const CallerInfo &assertCI, const CallerInfo &ci, const char *headline) override
static ALIB_DLL const char * ASSERTION_FORMAT_SHARED
std::atomic< int > CntSharedAcquirements
The number of shared acquirements.
CallerInfo SRelCI
The most recent shared release caller.