Closed mzimbres closed 1 year ago
After inspecting a bit the implementation, it turns out that a channel can't be used to replace the internal queue because we need the ability to partition the queue and set priorities on requests to support reconnection with proper resp3 handshake.
Asio channels are multiple-producers and multiple-consumer channels and can be used to simplify the connection internals by replacing the
std::queue
and per-request allocation of a timer. See https://github.com/chriskohlhoff/asio/blob/master/asio/src/examples/cpp20/channels/mutual_exclusion_1.cpp