Lumiera
0.pre.03
»edit your freedom«
|
DiagnosticContext frames are placed into automatic storage (as local variable within some function scope). Based on thread-local storage, the next reachable frame can be accessed from anywhere within the callstack. This feature is useful for collecting information regarding features cross-cutting the usual dependency hierarchy.
Definition at line 79 of file diagnostic-context-test.cpp.
Classes | |
struct | TestThread |
Build a call stack within separate thread and capture diagnostics. More... | |
Private Member Functions | |
virtual void | run (Arg) |
void | verify_heavilyParallelUsage () |
void | verify_simpleAccess () |
Static Private Member Functions | |
static VecI | descend (uint current) |
|
inlineprivate |
Access the next reachable frame.
Definition at line 96 of file diagnostic-context-test.cpp.
References DiagnosticContext< VAL >::access(), DiagnosticContext< VAL >::extractStack(), lib::test::anonymous_namespace{builder-qualifier-support-test.cpp}::one(), lib::test::anonymous_namespace{builder-qualifier-support-test.cpp}::two(), and VERIFY_ERROR.
|
inlineprivate |
Create several threads, each of which processes a sequence of numbers starting from a random initial value down to one. Whenever a simple division by two leads to an odd value, this value is placed onto the ContextStack. At recursion end, we take a snapshot of the full ContextStack and then unwind. Thus the captured numbers must from a decreasing sequence of odd values.
Definition at line 154 of file diagnostic-context-test.cpp.