Sujet : Re: signalling a condvar from inside vs. signalling a condvar von outside
De : Bonita.Montero (at) *nospam* gmail.com (Bonita Montero)
Groupes : comp.lang.c++Date : 15. Apr 2025, 10:41:06
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vtl9ii$3dqu3$1@raubtier-asyl.eternal-september.org>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
Am 13.04.2025 um 23:40 schrieb Chris M. Thomasson:
You code is hard to read. ...
The code is beautiful.
Signalling while locked or unlocked was an old debate. Think of signalling
while holding the lock. A thread gets woken and immediately sees that the
lock is held. Oh well. Wait morphing can help with that. However, signal
outside when you can...
The number of context-switches determined via getrusage() is twice per
loop iteration, i.e. on switch to the thread and one switch from the
thread; so everything is optimal with glibc.