37 using std::atomic_uint;
38 using std::atomic_bool;
39 using std::this_thread::sleep_for;
40 using std::chrono_literals::operator
""ms;
50 :
public Sync<NonrecursiveLock_Waitable>
52 atomic_uint sum_{0}, input_{0};
53 atomic_bool got_new_data_{
false};
58 Lock await{
this, [&]{
return bool(got_new_data_); }};
62 void provide (uint val)
103 CHECK (0 == token.result());
108 uint val = (rand() % 1000);
115 CHECK (2*val == token.result());
Facility for monitor object based locking.
Variant of the standard case, requiring to wait and join() on the termination of this thread...
scoped guard to control the actual locking.
Implementation namespace for support and library code.
Object Monitor based synchronisation.
Abstract Base Class for all testcases.
Simple test class runner.
Convenience front-end to simplify and codify basic thread handling.
uint result()
harvesting the result...
Lumiera error handling (C++ interface).
demonstrates how to wait on a simple boolean flag