This type is used for debugging and asserting types TCondition. With debug compilations that class holds one member of this struct, which aggregates all debug information.
Definition at line 277 of file dbgasserters.inl.
Public Static Field Index: | |
static ALIB_DLL const char * | ASSERTION_FORMAT |
Public Field Index: | |
CallerInfo | AcqCI |
Source location of the most recent acquirement. | |
std::thread::id | AssertExclusiveWaiter |
std::atomic< int > | CntWaiters {0} |
The number of currently waiting threads. | |
const character * | Name |
The name of this instance. | |
CallerInfo | NotifyCI |
The most recent call to ReleaseAndNotify or. | |
Thread * | Owner {nullptr} |
Tracks the current owner. | |
CallerInfo | RelCI |
Source location of the most recent release. | |
CallerInfo | WaitCI |
The most recent call to WaitForNotification. | |
Public Method Index: | |
ALIB_DLL void | Assert (bool cond, const CallerInfo &assertCI, const CallerInfo &ci, const char *headline) |
bool | IsOwnedByCurrentThread () const |
CallerInfo alib::threads::DbgConditionAsserter::AcqCI |
Source location of the most recent acquirement.
Definition at line 281 of file dbgasserters.inl.
std::thread::id alib::threads::DbgConditionAsserter::AssertExclusiveWaiter |
If set from outside, methods WaitForNotification will raise an assertion in the case they are called from a different thread.
Definition at line 286 of file dbgasserters.inl.
|
static |
The format string used to write exceptions to the console. This string can be changed if the source information is not "clickable" in a user's development environment.
The default string is optimized for JetBrains CLion and is defined as:
Assertion failed in method TCondition::{} Message: {} Instance: {} Called By: {}::{} At: {}:{} Thread: {} Current Owner: {} #Of Waiters: {} Exclusive Waiter: {} Latest Acquisition By: {}::{} At: {}:{} Thread: {} Latest Release By: {}::{} At: {}:{} Thread: {} Latest Wait By: {}::{} At: {}:{} Thread: {} Latest Notify By: {}::{} At: {}:{} Thread: {}
Definition at line 324 of file dbgasserters.inl.
std::atomic<int> alib::threads::DbgConditionAsserter::CntWaiters {0} |
The number of currently waiting threads.
Definition at line 285 of file dbgasserters.inl.
const character* alib::threads::DbgConditionAsserter::Name |
The name of this instance.
Definition at line 279 of file dbgasserters.inl.
CallerInfo alib::threads::DbgConditionAsserter::NotifyCI |
The most recent call to ReleaseAndNotify or.
Definition at line 284 of file dbgasserters.inl.
Thread* alib::threads::DbgConditionAsserter::Owner {nullptr} |
Tracks the current owner.
Definition at line 280 of file dbgasserters.inl.
CallerInfo alib::threads::DbgConditionAsserter::RelCI |
Source location of the most recent release.
Definition at line 282 of file dbgasserters.inl.
CallerInfo alib::threads::DbgConditionAsserter::WaitCI |
The most recent call to WaitForNotification.
Definition at line 283 of file dbgasserters.inl.
void alib::threads::DbgConditionAsserter::Assert | ( | bool | cond, |
const CallerInfo & | assertCI, | ||
const CallerInfo & | ci, | ||
const char * | headline ) |
Writes assertion info and calls ALIB_ASSERT.
cond | The condition that is to be met. |
assertCI | Location where the assertion is placed. |
ci | Location of the call to the method that asserted. |
headline | The message. |
Definition at line 146 of file dbgasserters.cpp.
|
inline |
Returns true
if the current owner is the current thread.
Available only in debug-builds.
true
, if the lock is owned by this thread, false
if it is owned by another thread or not owned. Definition at line 342 of file dbgasserters.inl.