Liste des Groupes | Revenir à cl c++ |
Am 22.04.2025 um 02:28 schrieb Chris M. Thomasson:It was created to try to _help_ with thundering herd. There can be some interesting issues... Think of pushing 12 items in the queue, broadcast inside the mutex, then 42 threads go onto the morph list. Depending on implementation, any new threads will not be able to acquire the mutex until those 42 threads are out of the morph. This can be bad for several reasons... If a thread is in the morph its in line waiting for it... So, it's a bit screwed and can't do anything else. If another thread can acquire the mutex before the morph is done, then it's basically thundering heard all over again. Fwiw, trying to scale mutexes is sort of odd anyway. We can make the best mutex ever, but they have trouble scaling.
That makes no sense? Wait Morphing Doesn't Guarantee Elimination of the Thundering Herd...Of course wait morphing helps here because with WM only one thread
sees the mutex unlocked and not n threads.
Les messages affichés proviennent d'usenet.