Liste des Groupes | Revenir à cl c++ |
Am 20.04.2025 um 07:43 schrieb Chris M. Thomasson:Barf! Are you daft? Only broadcast when you need to and well, try to strive to do it outside of the locked region, when you can. wow. Daft Punk?On 4/19/2025 9:29 PM, Bonita Montero wrote:You're simply silly. If I have more items in the queueThat's what I do after pushing n items to the queue:>
>
if( !m_nWaiting )
return;
if( n >= m_nWaiting )
m_cv.notify_all();
else
do
m_cv.notify_one();
while( --n );
>
>
What's more efficient, notifying all threads individually or
notifying all threads at once ?
again, only broadcast hen you have to! wow.
than waiting threads a broadcast is more efficient.
Les messages affichés proviennent d'usenet.