Re: counting_semaphore question

Liste des GroupesRevenir à cl c++ 
Sujet : Re: counting_semaphore question
De : chris.m.thomasson.1 (at) *nospam* gmail.com (Chris M. Thomasson)
Groupes : comp.lang.c++
Date : 11. Sep 2024, 22:51:38
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vbsvsr$3pr1c$2@dont-email.me>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
On 9/11/2024 5:10 AM, Bonita Montero wrote:
Am 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?

Date Sujet#  Auteur
11 Sep 24 * counting_semaphore question78Muttley
11 Sep 24 +* Re: counting_semaphore question63Bonita Montero
11 Sep 24 i`* Re: counting_semaphore question62Muttley
11 Sep 24 i `* Re: counting_semaphore question61Bonita Montero
11 Sep 24 i  +* Re: counting_semaphore question27Muttley
11 Sep 24 i  i+* Re: counting_semaphore question2Bonita Montero
11 Sep 24 i  ii`- Re: counting_semaphore question1Muttley
11 Sep 24 i  i+* Re: counting_semaphore question10David Brown
16 Sep23:22 i  ii`* Re: counting_semaphore question9Chris M. Thomasson
17 Sep09:22 i  ii `* Re: counting_semaphore question8David Brown
17 Sep20:56 i  ii  `* Re: counting_semaphore question7Chris M. Thomasson
18 Sep09:32 i  ii   `* Re: counting_semaphore question6David Brown
19 Sep12:57 i  ii    `* Re: counting_semaphore question5Bonita Montero
19 Sep13:01 i  ii     +- Re: counting_semaphore question1Bonita Montero
19 Sep21:09 i  ii     +- Re: counting_semaphore question1Chris M. Thomasson
19 Sep22:27 i  ii     `* Re: counting_semaphore question2Chris M. Thomasson
19 Sep22:30 i  ii      `- Re: counting_semaphore question1Chris M. Thomasson
12 Sep 24 i  i`* Re: counting_semaphore question14Ben Bacarisse
12 Sep 24 i  i `* Re: counting_semaphore question13Muttley
12 Sep 24 i  i  `* Re: counting_semaphore question12Andrey Tarasevich
12 Sep 24 i  i   `* Re: counting_semaphore question11Muttley
13 Sep 24 i  i    +* Re: counting_semaphore question9David Brown
13 Sep 24 i  i    i`* Re: counting_semaphore question8Muttley
13 Sep 24 i  i    i `* Re: counting_semaphore question7David Brown
13 Sep 24 i  i    i  `* Re: counting_semaphore question6Muttley
13 Sep 24 i  i    i   +* Re: counting_semaphore question3Bonita Montero
13 Sep 24 i  i    i   i+- Re: counting_semaphore question1Muttley
15 Sep17:33 i  i    i   i`- Re: counting_semaphore question1David Brown
13 Sep 24 i  i    i   `* Re: counting_semaphore question2David Brown
13 Sep 24 i  i    i    `- Re: counting_semaphore question1Muttley
13 Sep 24 i  i    `- Re: counting_semaphore question1Andrey Tarasevich
11 Sep 24 i  `* Re: counting_semaphore question33Chris M. Thomasson
12 Sep 24 i   `* Re: counting_semaphore question32Bonita Montero
12 Sep 24 i    `* Re: counting_semaphore question31Chris M. Thomasson
13 Sep 24 i     `* Re: counting_semaphore question30Bonita Montero
13 Sep 24 i      `* Re: counting_semaphore question29Chris M. Thomasson
14 Sep 24 i       `* Re: counting_semaphore question28Bonita Montero
14 Sep 24 i        +* Re: counting_semaphore question2Chris M. Thomasson
14 Sep21:07 i        i`- Re: counting_semaphore question1Chris M. Thomasson
14 Sep11:18 i        `* Re: counting_semaphore question25Muttley
14 Sep11:40 i         `* Re: counting_semaphore question24Bonita Montero
14 Sep12:58 i          +* Re: counting_semaphore question22Muttley
14 Sep13:15 i          i`* Re: counting_semaphore question21Bonita Montero
14 Sep17:13 i          i +* Re: counting_semaphore question12Muttley
14 Sep17:26 i          i i`* Re: counting_semaphore question11Bonita Montero
14 Sep17:48 i          i i `* Re: counting_semaphore question10Muttley
14 Sep17:50 i          i i  `* Re: counting_semaphore question9Bonita Montero
14 Sep17:55 i          i i   `* Re: counting_semaphore question8Muttley
14 Sep17:57 i          i i    `* Re: counting_semaphore question7Bonita Montero
15 Sep11:05 i          i i     `* Re: counting_semaphore question6Muttley
15 Sep11:48 i          i i      `* Re: counting_semaphore question5Bonita Montero
15 Sep11:52 i          i i       `* Re: counting_semaphore question4Muttley
15 Sep14:50 i          i i        `* Re: counting_semaphore question3Bonita Montero
15 Sep17:28 i          i i         `* Re: counting_semaphore question2Muttley
16 Sep05:02 i          i i          `- Re: counting_semaphore question1Bonita Montero
14 Sep21:12 i          i `* Re: counting_semaphore question8Chris M. Thomasson
15 Sep02:21 i          i  +- Re: counting_semaphore question1Chris M. Thomasson
15 Sep07:11 i          i  `* Re: counting_semaphore question6Bonita Montero
15 Sep07:20 i          i   `* Re: counting_semaphore question5Chris M. Thomasson
15 Sep09:35 i          i    `* Re: counting_semaphore question4Bonita Montero
15 Sep21:59 i          i     `* Re: counting_semaphore question3Chris M. Thomasson
16 Sep05:04 i          i      `* Re: counting_semaphore question2Bonita Montero
16 Sep22:30 i          i       `- Re: counting_semaphore question1Chris M. Thomasson
14 Sep21:09 i          `- Re: counting_semaphore question1Chris M. Thomasson
11 Sep 24 `* Re: counting_semaphore question14Andrey Tarasevich
11 Sep 24  `* Re: counting_semaphore question13Muttley
11 Sep 24   +* Re: counting_semaphore question6Bonita Montero
11 Sep 24   i`* Re: counting_semaphore question5Muttley
11 Sep 24   i +* Re: counting_semaphore question3Bonita Montero
11 Sep 24   i i`* Re: counting_semaphore question2Muttley
12 Sep 24   i i `- Re: counting_semaphore question1Bonita Montero
12 Sep 24   i `- Re: counting_semaphore question1Chris M. Thomasson
12 Sep 24   `* Re: counting_semaphore question6Andrey Tarasevich
12 Sep 24    `* Re: counting_semaphore question5Muttley
12 Sep 24     +* Re: counting_semaphore question2David Brown
12 Sep 24     i`- Re: counting_semaphore question1Muttley
12 Sep 24     +- Re: counting_semaphore question1Bonita Montero
12 Sep 24     `- Re: counting_semaphore question1Andrey Tarasevich

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal