Boost logo

Boost :

From: Andrzej Krzemienski (akrzemi1_at_[hidden])
Date: 2020-05-05 07:26:57


wt., 5 maj 2020 o 04:39 Gavin Lambert via Boost <boost_at_[hidden]>
napisał(a):

> On 4/05/2020 20:29, Andrzej Krzemienski wrote:
> > These are the guidelines that I learned from Robert Ramey's talk on
> > documenting a library (https://www.youtube.com/watch?v=ACeNgqBKL7E). As
> a
> > potential user I need to learn in no more than 5 minutes: what the
> library
> > does, how I will use it (LEAF documentation does it perfectly), and what
> > are the requirements. For the last point I would expect to see: "your
> > platform needs to support TLS, and your program cannot use coroutines in
> > asynchronous manner." IOW: high-level design trade-offs should be
> > documented up front.
>
> Coroutines can be used asynchronously without using threads. You just
> need to be careful to schedule them on an executor that is backed by
> only one thread, rather than a threadpool.
>
> In fact at least all the times that I have personally used coroutines,
> it's been in this manner -- when you're just managing multiple parallel
> tasks with a known-external delay (eg. slow network I/O), you don't
> really need a threadpool.
>

You are correct. Not every asynchronous use of coroutines is broken. Only
those that can potentially execute the continuation part on a different
thread.

Regards,
&rzej;


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk