diff --git a/conanfile.py b/conanfile.py index 6bd4838..b1b8e35 100644 --- a/conanfile.py +++ b/conanfile.py @@ -5,7 +5,7 @@ class IOMgrConan(ConanFile): name = "iomgr" - version = "11.1.0" + version = "11.1.1" homepage = "https://github.com/eBay/IOManager" description = "Asynchronous event manager" diff --git a/src/include/iomgr/io_environment.hpp b/src/include/iomgr/io_environment.hpp index c9232cf..95dedd1 100644 --- a/src/include/iomgr/io_environment.hpp +++ b/src/include/iomgr/io_environment.hpp @@ -47,6 +47,7 @@ class IOEnvironment { IOEnvironment& with_token_verifier(std::shared_ptr< sisl::TokenVerifier >&& token_verifier); IOEnvironment& with_token_client(std::shared_ptr< sisl::TokenClient >&& token_client); IOEnvironment& with_object_manager(); + IOEnvironment& with_grpc_client_workers(std::string const& name, uint32_t const num_workers); std::shared_ptr< iomgr::HttpServer > get_http_server() { return m_http_server; } std::shared_ptr< sisl::TokenVerifier > get_token_verifier() { return m_token_verifier; } diff --git a/src/lib/io_environment.cpp b/src/lib/io_environment.cpp index 97f805e..2b29ded 100644 --- a/src/lib/io_environment.cpp +++ b/src/lib/io_environment.cpp @@ -17,6 +17,7 @@ #include "iomgr_config.hpp" #include +#include namespace iomgr { @@ -28,6 +29,7 @@ IOEnvironment::IOEnvironment() { IOEnvironment::~IOEnvironment() { if (m_http_server) { m_http_server->stop(); } if (m_file_watcher) { m_file_watcher->stop(); } + sisl::GrpcAsyncClientWorker::shutdown_all(); } void IOEnvironment::restart_http_server(std::string const& ssl_cert, std::string const& ssl_key) { @@ -75,6 +77,11 @@ IOEnvironment& IOEnvironment::with_object_manager() { return get_instance(); } +IOEnvironment& IOEnvironment::with_grpc_client_workers(std::string const& name, uint32_t const num_workers) { + sisl::GrpcAsyncClientWorker::create_worker(name, num_workers); + return get_instance(); +} + std::string IOEnvironment::get_ssl_cert() const { return m_ssl_cert; } std::string IOEnvironment::get_ssl_key() const { return m_ssl_key; } void IOEnvironment::set_ssl_certs(std::string const& ssl_cert, std::string const& ssl_key) {