Deutsch English Français Italiano |
<6eaf376ece1c49636550223f6c99491b@www.novabbs.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: mitchalsup@aol.com (MitchAlsup1) Newsgroups: comp.arch Subject: Re: Continuations Date: Tue, 16 Jul 2024 00:25:39 +0000 Organization: Rocksolid Light Message-ID: <6eaf376ece1c49636550223f6c99491b@www.novabbs.org> References: <v6tbki$3g9rg$1@dont-email.me> <4j389jlb44kuhi3o5igf8ucnks3q9m3lc8@4ax.com> <v714in$1foh$2@gal.iecc.com> <lfims1Fl57mU1@mid.individual.net> <v71jfh$jko$1@gal.iecc.com> <pFdlO.42948$BYv6.40771@fx09.iad> <v74ct9$tuk4$3@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: i2pn2.org; logging-data="3426565"; mail-complaints-to="usenet@i2pn2.org"; posting-account="65wTazMNTleAJDh/pRqmKE7ADni/0wesT78+pyiDW8A"; User-Agent: Rocksolid Light X-Rslight-Posting-User: ac58ceb75ea22753186dae54d967fed894c3dce8 X-Rslight-Site: $2y$10$zeZpgwFjmxtVZC9PDRzZmOhjYKGyH43miMu8Pr7zRlxuYuwZPDjqq X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 2089 Lines: 23 On Mon, 15 Jul 2024 23:55:21 +0000, Lawrence D'Oliveiro wrote: > On Mon, 15 Jul 2024 14:12:32 -0400, EricP wrote: > >> The effect is that code bounces from action routine to action routine >> carrying its execute context with it, waiting for something external, >> evaluating the result and deciding what action to do next. > > The thing that coroutines bring to the table is that you don’t have to > break up the code that executes in this common context into separate > pieces that are each invoked via a callback and end in a reschedule > call. > Intead, you just write it as a single block, with explicit “await” calls > at the various points along the way where rescheduling happens. Is that still valuable if it cost 50× what a subroutine call costs ??? Is that still valuable if you can do it yourself at only 20× the cost ??? > The net result is the logic is much easier to follow, and there is often > less of it. The right answer late is the wrong answer.