Open pfeatherstone opened 1 year ago
Is the associated executor propagated ?
@klemens-morgenstern
It is propagated and yes you can do this. I would recommend sticking to simple compositions though, this can get out of hand quickly. Also have a look a experimental::co_composed if you are using C++20
Yeah I would use async_compose() for a state machine style operation. Otherwise, deferred looks 100 times better. Very similar to what the continuable library does.
It looks like from https://think-async.com/Asio/asio-1.28.0/src/examples/cpp14/deferred/deferred_7.cpp that we can write composed operations using deferred completion token. It looks nicer than using async_compose(), co_composed<> etc. is this good practice ?