Skip to content

Commit

Permalink
[coro_io] add size() for channel (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
poor-circle authored Jan 19, 2024
1 parent 9469e9f commit b7ec8af
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/ylt/coro_io/channel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ class channel {
return send_request(std::move(op), config_.pool_config.client_config);
}

std::size_t size() const noexcept { return client_pools_.size(); }

static channel create(const std::vector<std::string_view>& hosts,
const channel_config& config = {},
client_pools_t& client_pools =
Expand Down

0 comments on commit b7ec8af

Please sign in to comment.