1#if !ALIB_SINGLE_THREADED && ALIB_DEBUG
15"Multi-Threading {} in Lock \"{}\"" "\n"
17" In (Member-)Function: {}" "\n"
18" Is Owned: {} ({})" "\n"
20" Called By: {}::{}" "\n"
24" Latest Acquisition By: {}::{}" "\n"
26" Seq / Thread: {} / {}" "\n"
27" Latest Release By: {}:{}" "\n"
29" Seq / Thread: {} / {}" "\n"
33"Multi-Threading {} in Shared-Lock \"{}\"" "\n"
35" In (Member-)Function: {}" "\n"
36" Is Owned: {} ({})" "\n"
37" Is Shared Owned: {} ({})" "\n"
39" Called By: {}::{}" "\n"
43" Latest Acquisition By: {}::{}" "\n"
45" Seq / Thread: {} / {}" "\n"
46" Latest Release By: {}::{}" "\n"
48" Seq / Thread: {} / {}" "\n"
50" Latest Shared Acquisition By: {}::{}" "\n"
52" Seq / Thread: {} / {}" "\n"
53" Latest SharedRelease By: {}::{}" "\n"
55" Seq / Thread: {} / {}" "\n"
60 const char* headline ) {
62 (type== 0 ?
"Assertion" :
"Warning"),
70 Rel.CI.TypeInfo,
Rel.CI.Func,
Rel.CI.File,
Rel.CI.Line,
Rel.ActionNo,
Rel.CI.ThreadID );
74 const char* headline ) {
76 (type== 0 ?
"Assertion" :
"Warning"),
91"Assertion failed in method TCondition::{}" "\n"
95" Called By: {}::{}" "\n"
99" Current Owner: {}" "\n"
100" #Of Waiters: {}" "\n"
101" Exclusive Waiter: {}" "\n"
103" Latest Acquisition By: {}::{}" "\n"
105" Seq / Thread: {} / {}" "\n"
106" Latest Release By: {}::{}" "\n"
108" Seq / Thread: {} / {}" "\n"
110" Latest Wait By: {}::{}" "\n"
112" Seq / Thread: {} / {}" "\n"
113" Latest Notify By: {}::{}" "\n"
115" Seq / Thread: {} / {}" "\n"
119 const char* headline ) {
127 Acq.CI.TypeInfo,
Acq.CI.Func,
Acq.CI.File,
Acq.CI.Line,
Acq.ActionNo,
Acq.CI.ThreadID,
128 Rel.CI.TypeInfo,
Rel.CI.Func,
Rel.CI.File,
Rel.CI.Line,
Rel.ActionNo,
Rel.CI.ThreadID,
137 DoAssert( 0, assertCI, requestCI,
"Already (still) owned." );
145 " Warning limit can be adopted with field DbgRecursionWarningThreshold";
149 msg+=
" recursive acquisitions."
150 " Warning limit can be adopted with field DbgRecursionWarningThreshold";
static 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
ActionInfo Rel
Source location of the most recent release.
void Assert(bool cond, const CallerInfo &assertCI, const CallerInfo &ci, const char *headline)
const character * Name
The name of this instance.
ActionInfo Acq
Source location of the most recent acquirement.
static const char * ASSERTION_FORMAT
Thread * Owner
Tracks the current owner.
ActionInfo Notify
The most recent call to #"%ReleaseAndNotify".
std::atomic< int > CntWaiters
The number of currently waiting threads.
static const char * ASSERTION_FORMAT
ActionInfo Rel
Source location of the most recent release.
virtual void DoAssert(int type, const CallerInfo &assertCI, const CallerInfo &ci, const char *headline)
Thread * GetOwner() const
ActionInfo Acq
Source location of the most recent acquirement.
std::atomic< int > CntAcquirements
The number of shared acquirements.
void SetRecursiveOwner(const CallerInfo &assertCI, const CallerInfo &requestCI)
ActionInfo SAcq
The most recent shared acquirement's caller.
void DoAssert(int type, const CallerInfo &assertCI, const CallerInfo &ci, const char *headline) override
static const char * ASSERTION_FORMAT_SHARED
std::atomic< int > CntSharedAcquirements
The number of shared acquirements.
ActionInfo SRel
The most recent shared release caller.