boostorg / redis

An async redis client designed for performance and scalability
https://www.boost.org/doc/libs/develop/libs/redis/doc/html/index.html
Boost Software License 1.0
232 stars 36 forks source link

Using stackless coroutine instead of stateful one. #26

Closed enum-class closed 2 years ago

enum-class commented 2 years ago

I have found that you use stateful version of coroutine in codes. (async_compose). Is there any special technical decision about using stackful against stackless coroutines ?

mzimbres commented 2 years ago

Hi, I actually use stackless coroutines throughout my code as you can see e.g. here. As far as I can see async_compose is about simplifying the writing of stateful composed operations, that means, it is coroutine agnostic. In other words, you are free to use whatever completion token you like, including stackful coroutines like those provided by asio.