15#include <boost/asio/io_context.hpp>
29 explicit Client(
const std::string &fallback_address)
38 template <
typename Functor>
A thread pool based on Boost.Asio's io context.
void Stop()
Stop the ThreadPool and join all its threads.
void AsyncRun(size_t worker_threads)
Launch threads to run tasks asynchronously.
void Run()
Run tasks in this thread.
auto & io_context()
Return the underlying io_context.
A client able to subscribe to multiple streams.
void AsyncRun(size_t worker_threads)
void Subscribe(const Token &token, Functor &&callback)
void UnSubscribe(const Token &token)
Client(const std::string &fallback_address)
underlying_client _client
A token that uniquely identify a stream.
Serializes a stream endpoint.
void Subscribe(boost::asio::io_context &io_context, token_type token, Functor &&callback)
void UnSubscribe(token_type token)
This file contains definitions of common data structures used in traffic manager.