Liste des Groupes | Revenir à cl c++ |
Am 13.04.2025 um 21:32 schrieb Chris M. Thomasson:You code is hard to read. Sigh. 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...On 4/13/2025 8:38 AM, Bonita Montero wrote:The numer of context-switches my code shows say that there's onlyAm 12.04.2025 um 21:33 schrieb Chris M. Thomasson:>
>There is a scalability problem wrt signalling inside the critical section. Does your convdar impl use wait morphing?>
There's no scalability problem with that since the kernel call to
release a thread happens only when the mutex is accessible *and*
the cv is signalled.
>
>
No. ...
one context-switchz per wait.
Whatever.When you signal a condvar while holding the lock it means that waiters can wake and just instantly wait on the lock. This is why wait morphing was created. It helps, but only so much...idiot.
Les messages affichés proviennent d'usenet.