Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Muttley@dastardlyhq.com Newsgroups: comp.lang.c++ Subject: Re: counting_semaphore question Date: Thu, 12 Sep 2024 11:00:20 -0000 (UTC) Organization: A noiseless patient Spider Lines: 20 Message-ID: References: <87ikv1i2yk.fsf@bsb.me.uk> Injection-Date: Thu, 12 Sep 2024 13:00:21 +0200 (CEST) Injection-Info: dont-email.me; posting-host="dee5b336ab8993ce946245f7c5d523d8"; logging-data="247746"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+GttJgBCkhwax+r5t5wy/X" Cancel-Lock: sha1:Eds0xTWcvoXLHfjTfQA18PdqM4M= Bytes: 1620 On Thu, 12 Sep 2024 11:25:07 +0100 Ben Bacarisse boringly babbled: >Muttley@dastardlyhq.com writes: >> Sorry, I still don't get it. What do you mean by maximum counter? > >You might want to consider who you are talking to. I guess so. >The template parameter M is very different and rather unusual. It is, And very poorly explained in all the online documentation. >But this "limit" is not enforced other than by making the behaviour >undefined when it is exceeded. Pre-conditions on the operations state Clang seems to ignore it. You can call release() as much as you like and it'll just keep increasing the counter.