Article View: comp.lang.c++
Article #534Re: “The end of software secrecy is almost upon
From: boltar
Date: Sat, 31 Oct 2026 09:45
Date: Sat, 31 Oct 2026 09:45
30 lines
2297 bytes
2297 bytes
On Fri, 30 Oct 2026 22:35:05 -0000 (UTC)
Lawrence =?iso-8859-13?q?D=FFOliveiro?= <ldo@nz.invalid> gabbled:
>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.
Coroutines are just a complicated way to re-implement a function with a load
of statics.
eg:
void myfunc()
{
static int i = 0;
for(;;++i)
{
[do something based on value of i]
[return when some condition met]
}
}
Also the C++ implementation is so bad its unusable.
>Credit to Microsoft for pioneering this, but nowadays you see the idea
>popping up in JavaScript and Python and who knows where else.
Python nailed it - you just call "yield", job done.
Technical Details
Message-ID:
<11c4db0$39hln$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> <11c362o$lfc1$1@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: boltar@caprica.universe Newsgroups: comp.lang.fortran,comp.lang.c++,alt.comp.lang.rust,alt.folklore.computers Subject: Re: “The end of software secrecy is almost upon Date: Sat, 31 Oct 2026 09:45:04 -0000 (UTC) Organization: A noiseless patient Spider Lines: 30 Message-ID: <11c4db0$39hln$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> <11c362o$lfc1$1@dont-email.me> Content-Type: text/plain; charset=UTF-8 Injection-Date: Sat, 31 Oct 2026 09:45:05 +0000 (UTC) Injection-Info: dont-email.me; logging-data="3458743"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JPEZFc396hI31fQlEvAXt"; posting-host="1f5a4d81006d45a41cc4c0301d1b2b21" Cancel-Lock: sha1:6XfzFH3AXecvDAAJwIZjDWZnrgk= sha256:5F2+FrslcU63BJU2CkPzsaPfJiR3zwHjyJg4fMAyWSA= sha1:nYJAgiwTLEu68uhhjTanUZr9w/o= sha256:pOMhkcNPvz0bSnrTMr8opBXrRQmS7xTXhaNYDnw0Sjg=