Boost logo

Boost Users :

Subject: Re: [Boost-users] ASIO: custom service which works with spawn/yield
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2018-07-27 01:03:35


On 27/07/2018 02:32, Vinnie Falco wrote:
> If anything, this just highlights the complexity of [networking.ts].
> Users will definitely be making these mistakes repeatedly, especially
> the one where the 1-arg version of `post` is called instead of the
> 2-arg version.

This raises a concern that I've had for a while; if it's this hard to
implement asynchronous operations correctly, I can't see it being very
successful in practice.

If you look at other languages and frameworks, once you introduce
fundamental asynchronous operations they then quickly "infect" higher
layer operations that want to be asynchronously composed of other
operations, and so forth, until even the top-most UI layer wants to be
largely asynchronous to avoid blocking the main event loops. "Async all
the way down."

This means that everybody, including general application developers,
needs to be able to easily write asynchronous methods, without having to
worry about falling into these pitfalls. (It needs to be a "pit of
success", not requiring several code reviews by experienced library
developers in order to spot the mistakes.)


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net