Path: ...!weretis.net!feeder9.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lawrence D'Oliveiro Newsgroups: comp.lang.c++,comp.lang.c Subject: Re: Threads across programming languages Date: Thu, 2 May 2024 23:15:16 -0000 (UTC) Organization: A noiseless patient Spider Lines: 29 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 03 May 2024 01:15:16 +0200 (CEST) Injection-Info: dont-email.me; posting-host="cfd0dd0a0e9abee8835016bed2d05754"; logging-data="142241"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/0ufeKxZ+ZKY1Vf0Belc0J" User-Agent: Pan/0.155 (Kherson; fc5a80b8) Cancel-Lock: sha1:WqunBRmxh/Z9y7W70SLj/8fCEUQ= Bytes: 2506 On Thu, 2 May 2024 13:28:15 -0700, Chris M. Thomasson wrote: > On 5/1/2024 10:39 PM, Lawrence D'Oliveiro wrote: >> >> On Wed, 1 May 2024 22:20:47 -0700, Chris M. Thomasson wrote: >> >>> On 5/1/2024 1:34 PM, Lawrence D'Oliveiro wrote: >>> >>>> Remember, we’re talking about maximizing I/O throughput here, so CPU >>>> is not the bottleneck. >>> >>> It can be if your thread synchronization scheme is sub par. >> >> Another reason to avoid threads. > > Why? Believe it or not, there are ways to create _highly_ scalable > thread synchronization schemes. I’m sure there are. But none of that is relevant when the CPU isn’t the bottleneck anyway. >> So long as your async tasks have an await call somewhere in their main >> loops, that should be sufficient to avoid most bottlenecks. > > async tasks are using threads... No? No. They are built on coroutines. Specifically, the “stackless” variety.