28 using std::atomic_uint;
29 using std::atomic_bool;
30 using std::this_thread::sleep_for;
31 using 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_); }};
53 void provide (uint val)
95 CHECK (0 == token.result());
100 uint val =
rani(1000);
107 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...
int rani(uint bound=_iBOUND())
scoped guard to control the actual locking.
Implementation namespace for support and library code.
Object Monitor based synchronisation.
Abstract Base Class for all testcases.
Simplistic 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