From 99e4c746c09fff6ad34134f8e61a75625811b0d4 Mon Sep 17 00:00:00 2001 From: "Zezheng.Li" Date: Fri, 19 Jan 2024 15:31:10 +0800 Subject: [PATCH] [coro_io] add size() for channel --- include/ylt/coro_io/channel.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ylt/coro_io/channel.hpp b/include/ylt/coro_io/channel.hpp index dd9d5489a..2587837a9 100644 --- a/include/ylt/coro_io/channel.hpp +++ b/include/ylt/coro_io/channel.hpp @@ -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& hosts, const channel_config& config = {}, client_pools_t& client_pools =