Re: Capy Review, take 2

Rainer Deyke via Boost <[email protected]> Tue, 30 Jun 2026 09:08:05 +0200
Newsgroups gmane.comp.lib.boost.devel
Message-ID <[email protected]>
On 6/29/26 17:04, Vinnie Falco via Boost wrote:
> On Mon, Jun 29, 2026 at 8:02 AM Rainer Deyke via Boost <
> [email protected]> wrote:
> 
>> It's easy to come up with examples where executor hops are saved by
>> resume_on.
>>
>>     task<int> f() {
>>       capy::run(ex1)([] { do_something_on_e1(); });
>>       capy::run(ex2)([] { do_something_on_e2(); });
>>       capy::run(ex3)([] { do_something_on_e3(); });
>>     }
>>
> 
> Yes of course this is a contrived example but what is the use case? What
> executors are these? Does each represent a different thread pool? A
> different pinned CPU? Why are you launching a coroutine on one executor,
> and then sequentially waiting for each of three coroutines, each launched
> on a different executor?
Using different strands for accessing different shared resources?

   task<int> f() {
     capy::run(strand1)([] { do_something_on_strand1(); });
     capy::run(strand2)([] { do_something_on_strand2(); });
     capy::run(strand3)([] { do_something_on_strand3(); });
   }


-- 
Rainer Deyke - [email protected]

_______________________________________________
Boost mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.boost.org/mailman3/lists/boost.lists.boost.org/
Archived at: https://lists.boost.org/archives/list/[email protected]/message/ZBOTE2B74XIGYGJUIBNF62Y7DWW5KRYL/