🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++
Article #1203

Re: Fwd: futexes vs. system semaphores

#1203
From: Tristan Wibberley
Date: Sun, 06 Dec 2026 03:12
26 lines
2366 bytes
On 04/12/2026 23:25, Chris M. Thomasson wrote:
> On 11/22/2026 5:20 AM, Bonita Montero wrote:
> [...]
> 
> FtxSema s(false);
> 
> // producer
> queue.push(a); s.release();
> queue.push(b); s.release();   // count is still 1, not 2

Why is that a problem, every semaphore has a maximum capacity, that
one's maximum is 1.


-- 
Tristan Wibberley

The message body is Copyright (C) 2026 Tristan Wibberley except
citations and quotations noted. All Rights Reserved except that you may,
of course, cite it academically giving credit to me, distribute it
verbatim as part of a usenet system or its archives, and use it to
promote my greatness and general superiority without misrepresentation
of my opinions other than my opinion of my greatness and general
superiority which you _may_ misrepresent. You definitely MAY NOT train
any production AI system with it but you may train experimental AI that
will only be used for evaluation of the AI methods it implements.
Technical Details
Message-ID: <11f2jrb$3jjje$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11duih8$sm6c$1@raubtier-asyl.eternal-september.org> <11duq79$vfpt$1@raubtier-asyl.eternal-september.org> <11evi5g$25mm2$2@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Tristan Wibberley <tristan.wibberley+netnews2@alumni.manchester.ac.uk>
Newsgroups: comp.lang.c++
Subject: Re: Fwd: futexes vs. system semaphores
Date: Sun, 6 Dec 2026 03:12:43 +0000
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <11f2jrb$3jjje$1@dont-email.me>
References: <11duih8$sm6c$1@raubtier-asyl.eternal-september.org>
 <11duq79$vfpt$1@raubtier-asyl.eternal-september.org>
 <11evi5g$25mm2$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 06 Dec 2026 03:12:44 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3788398"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18m7Ie7kFkz9dbOgYTP87cLflIPL0WkYyjRmuC4tFo8LQ=="; posting-host="dcb879cf630529286ffe07c4eb0b98ca"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:u12euc2G3lOteOwSzNjTPYJ7xaM= sha256:K1AghXOfs7PBeQt0ioN1AkpS0CfXePuXyDtvb/6+Y+E=
	sha1:v+hWIfpcJR8vcpk/TTw1bh+AZI0= sha256:e39nEvk0pq+7+haiMwsYaolmQ2RCfeusGcEJh9y2bsk=
In-Reply-To: <11evi5g$25mm2$2@dont-email.me>
Content-Language: en-GB