Boost logo

Boost :

Subject: Re: [boost] Promise/A+ like javascript in cpp
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2018-07-27 05:58:35


On 27/07/2018 14:13, hawk x wrote:
> boost::coroutine and std::future are all excellent solutions for
> concurrency programming.
> But if there's many concurrent tasks, event-loop based multi-task in SINGLE
> thread will have the best performance.

coroutines can be used to manage concurrent tasks on a single thread.

Boost.Asio is one way to manage those tasks with an event loop (simply
have a single thread running the io_service/io_context); additional work
can be posted both from "inside" and outside.

Boost.Fiber
(https://www.boost.org/doc/libs/1_67_0/libs/fiber/doc/html/index.html)
is another way. This also supports futures, although not currently
then-able ones.


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