Liste des Groupes | Revenir à cl c |
Lawrence D'Oliveiro <ldo@nz.invalid> writes:On Wed, 1 May 2024 11:00:04 +0200, Bonita Montero wrote:
Am 01.05.2024 um 10:53 schrieb Lawrence D'Oliveiro:>
No async/await? Oh, they haven’t added that to C++--yet.
No, Boost.ASIO is event driven with asynchronous callbacks in a
foreign thread's context.
Callbacks can be a clunky way of event handling, since they force
you to break up your logic sequence into discontinguous pieces. This
is why coroutines have become popular, since they keep the logic
flow together.
Callbacks work just fine, as the logic for submitting a request
is quite different from the logic for completing a request; indeed,
they more closely mirror the hardware interrupt that signals
completion.
I wouldn't call coroutines popular at all, outside of python
generators.
Les messages affichés proviennent d'usenet.