Deutsch English Français Italiano |
<vatohm$mu0b$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: jseigh <jseigh_es00@xemaps.com> Newsgroups: comp.lang.c++ Subject: Re: Futexes ain't fast Date: Fri, 30 Aug 2024 20:36:06 -0400 Organization: A noiseless patient Spider Lines: 18 Message-ID: <vatohm$mu0b$1@dont-email.me> References: <van414$3fe9t$1@raubtier-asyl.eternal-september.org> <vashj8$gpjk$1@dont-email.me> <vat7ft$k5je$7@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sat, 31 Aug 2024 02:36:07 +0200 (CEST) Injection-Info: dont-email.me; posting-host="67b88aec8708cc33f777581dc9eca8e9"; logging-data="751627"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Z5pFiA8RjH7VbqYLR+kKK" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:JAiOs18fr2povONHQZK7+eM+n8g= In-Reply-To: <vat7ft$k5je$7@dont-email.me> Content-Language: en-US Bytes: 1654 On 8/30/24 15:45, Chris M. Thomasson wrote: > On 8/30/2024 6:31 AM, jseigh wrote: .... >> >> They don't have to be fast, they just have to allow correct >> synchronization >> and allow performant fast paths. Can the api be improved for the latter? >> Certainly yes. It is an awkward api to use. > > 100% agreed. Eventcounts are in the mix as well. > You might take a look at folly's eventcount. It (I think) only calls futex wake if there are waiters, and only calls futex_wait if the eventcount hasn't been incremented. I did my own C version since I'm working in C for now. Joe Seigh