32 const uint NUM_THREADS = 20;
64 Threads threads{NUM_THREADS,
65 [&](Threads::ElementHolder& storage)
69 for (
uint i=0; i<NUM_LOOP; ++i)
82 for (
auto& thread : threads)
85 CHECK (contended == NUM_THREADS * NUM_LOOP,
86 "ALARM: Lock failed, concurrent modification "
87 "during counter increment. Delta == %d"
88 ,NUM_THREADS * NUM_LOOP - contended);
static snd_pcm_sframes_t delay
A synchronisation protection guard employing a lock scoped to the parameter type as a whole,...
A fixed collection of non-copyable polymorphic objects.
Variant of the standard case, requiring to wait and join() on the termination of this thread.
lib::Result< RES > join()
put the caller into a blocking wait until this thread has terminated
Abstract Base Class for all testcases.
void seedRand()
draw a new random seed from a common nucleus, and re-seed the default-Gen.
const uint NUM_LOOP
number of loop iterations per thread
Implementation namespace for support and library code.
Random defaultGen
a global default RandomSequencer for mundane purposes
auto buildCappedSubSequence(RandomSequencer< GEN > &src)
Test runner and basic definitions for tests.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
Managing a collection of non-copyable polymorphic objects in compact storage.
A special implementation of lib::Sync, where the storage of the object monitor is associated directly...
Convenience front-end to simplify and codify basic thread handling.