Liste des Groupes | Revenir à cl c++ |
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:again, only broadcast hen you have to! wow.
>
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 ?
Les messages affichés proviennent d'usenet.