boostorg / cobalt

Coroutines for C++20 & asio
https://www.boost.org/doc/libs/master/libs/cobalt/doc/html/index.html
207 stars 24 forks source link

Provide async_read_until that uses symmetric transfer #127

Open mzimbres opened 1 year ago

mzimbres commented 1 year ago

A coroutine based implementation of asio::async_read_until should be more efficient than the Asio version since it can use symmetric-transfer to avoid a reschedule operation when the buffer already contain the separator.

It would be nice if you could provide this as an example. It would also be an opportunity to show users what kind of improvement they get in comparison to Asio. I would also include this in the benchmark session.

klemens-morgenstern commented 1 year ago

Good idea, but I might just add my own impl if I do some IO work.