Article View: comp.lang.c++
Article #525Re: “The end of software secrecy is almost upon us”
From: Lawrence D’Oliveiro
Date: Fri, 30 Oct 2026 22:35
Date: Fri, 30 Oct 2026 22:35
31 lines
3049 bytes
3049 bytes
On Fri, 30 Oct 2026 20:37:14 +0100, Jeroen Belleman wrote: > That's where threads are useful: The GUI is one thread, and the > "other things" are in one or more other threads. There are > altogether too many programs that hang the GUI while "other things" > are going on. That should never happen! Back in the 1990s, threading was seen as the answer to everything. Some even tried multithreaded GUIs. The trouble with threading is its “default-shared-everything” model, as opposed to separate processes, which are “default-shared-nothing”. It is all too easy to forget to synchronize access to shared objects, lock things properly etc, and end up with hard-to-diagnose bugs that tend to hide themselves when you try to go look for them (see “Heisenbug”). The trend nowadays is to revive the old coroutine concept, in a new guise called “stackless” coroutines. These give you support for async operations, but with transfers of control being made explicit at “await” points, rather than unpredictably as with full preemptive threading. This greatly reduces the opportunity for race conditions. Credit to Microsoft for pioneering this, but nowadays you see the idea popping up in JavaScript and Python and who knows where else. Threading is still definitely useful, mainly for performance, where the bottleneck is in CPU usage. But if a program is spending most of its time waiting for I/O over the network, or for a user to initiate a GUI action, or something external and relatively slow like that, then coroutines keep things simpler.
Technical Details
Message-ID:
<11c362o$lfc1$1@dont-email.me>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mailReferences:
<11amvre$15far$1@dont-email.me> <20261030005434.00005458@yahoo.com> <11c0v1j$her$1@reader2.panix.com> <20261030105900.000020ce@yahoo.com> <11c1uqd$keq$1@reader2.panix.com> <11c2fcl$19bk2$1@dont-email.me> <11c2rla$hko3$2@dont-email.me>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Lawrence D’Oliveiro <ldo@nz.invalid> Newsgroups: comp.lang.fortran,comp.lang.c++,alt.comp.lang.rust,alt.folklore.computers Subject: Re: “The end of software secrecy is almost upon us” Date: Fri, 30 Oct 2026 22:35:05 -0000 (UTC) Organization: A noiseless patient Spider Lines: 31 Message-ID: <11c362o$lfc1$1@dont-email.me> References: <11amvre$15far$1@dont-email.me> <20261030005434.00005458@yahoo.com> <11c0v1j$her$1@reader2.panix.com> <20261030105900.000020ce@yahoo.com> <11c1uqd$keq$1@reader2.panix.com> <11c2fcl$19bk2$1@dont-email.me> <11c2rla$hko3$2@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 30 Oct 2026 22:35:05 +0000 (UTC) Injection-Info: dont-email.me; logging-data="703873"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18PptIIJ4WAddoY9CmdvwZJ"; posting-host="a2d4bf737ef4dcecc3ecbe7a7a4a744c" User-Agent: Pan/0.165 (Kostiantynivka) Cancel-Lock: sha1:t989Bb/XuOrnBBtLwu3Eh/qm8mY= sha256:5qDFWUmIGgTVhQKjUKQ6Popao5yqFPT0sRqfAl0kXvo= sha1:EkrrHmurVvH+KVHd1JXVLxoOX+Q= sha256:mR5QEmIA9aTLZmMFsC5NudfLLQQT4wjFkV0LGMkcBCo=