28using std::atomic_uint;
29using std::atomic_bool;
30using std::this_thread::sleep_for;
31using std::chrono_literals::operator
""ms;
41 :
public Sync<NonrecursiveLock_Waitable>
43 atomic_uint sum_{0}, input_{0};
44 atomic_bool got_new_data_{
false};
49 Lock await{
this, [&]{
return bool(got_new_data_); }};
95 CHECK (0 == token.result());
107 CHECK (2*val == token.result());
scoped guard to control the actual locking.
Facility for monitor object based locking.
Variant of the standard case, requiring to wait and join() on the termination of this thread.
demonstrates how to wait on a simple boolean flag
uint result()
harvesting the result...
Abstract Base Class for all testcases.
void seedRand()
draw a new random seed from a common nucleus, and re-seed the default-Gen.
Lumiera error handling (C++ interface).
Implementation namespace for support and library code.
int rani(uint bound=_iBOUND())
Test runner and basic definitions for tests.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Object Monitor based synchronisation.
Convenience front-end to simplify and codify basic thread handling.