Sujet : Re: Solving thundering Herd with glibc...
De : Bonita.Montero (at) *nospam* gmail.com (Bonita Montero)
Groupes : comp.lang.c++Date : 25. Apr 2025, 12:27:28
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vufrhn$3s5jj$1@raubtier-asyl.eternal-september.org>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
Am 25.04.2025 um 10:37 schrieb Bonita Montero:
Yes, controlled test with 10'000 iterations.
The code is correct and trivial, but too much for you.
A thundering herd problem with a condvar should occur if I notify > 1
threads and unlock the mutex, but it actually dosn't happen; never.
So the glibc condvar is optimal.