Deutsch English Français Italiano |
<v116q4$4at1$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
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 <ldo@nz.invalid> 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: <v116q4$4at1$1@dont-email.me> References: <GIL-20240429161553@ram.dialup.fu-berlin.de> <v0ogum$1rc5n$1@dont-email.me> <v0ovvl$1ur12$4@dont-email.me> <v0p06i$1uq6q$5@dont-email.me> <v0shti$2vrco$2@raubtier-asyl.eternal-september.org> <v0spsh$31ds4$3@dont-email.me> <v0stic$325kv$3@raubtier-asyl.eternal-september.org> <v0svtn$32o8h$1@dont-email.me> <v0t091$32qj6$1@raubtier-asyl.eternal-september.org> <v0u90h$3c1r5$4@dont-email.me> <v0v7rf$3lu04$1@dont-email.me> <v0v8u3$3m7rm$1@dont-email.me> <v10t0v$20cs$1@dont-email.me> 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. <https://gitlab.com/ldo/python_topics_notebooks/-/blob/master/Generators%20&%20Coroutines.ipynb?ref_type=heads>