Liste des Groupes | Revenir à cl c++ |
Am 11.09.2024 um 22:51 schrieb Chris M. Thomasson:Huh? What about the contention that can cause slow paths to me hit that might get into a kernel wait on a sync object?On 9/11/2024 5:10 AM, Bonita Montero wrote:Yes. If the consumer and producer are constantly processing you usuallyAm 11.09.2024 um 14:03 schrieb Muttley@dastardlyhq.com:>
>What upper limit? The max number of threads allowed in the protected section>
above is 2, not 10. Or do you mean it'll only count up to 10 threads waiting
and ignore any beyond that? What happens if thread 11 comes along?
The static parmeter is the maximum counter and the the two is the
initial counter. So two threads can currently acquire that semaphore.
>Condition variables IMO are unintuitive (eg the internal state change from>
waiting on condition variable to waiting on mutex is completely invisible)
and hence very prone to logical bugs. I tend to avoid them where possible.
If you have a producer-consumer-pattern condition variables are the most
efficient way to handle this pattern.
>
Really?
have no kernel-calls.
Les messages affichés proviennent d'usenet.