id summary reporter owner description type status milestone component version severity resolution keywords cc 5007 boost 1.42, asio async_resolve add thread exit method gongyiling chris_kohlhoff " In our project, we use boost::asio::ip::tcp::resolver as DNS resolver, but found a problem, that is: a thread was created during the resolving process, and didn't quit when resolve finished, making it hard to slim project's threads number. so, I dig into the source code, blabla, and fixed this ""problem"" i'm new to this stuff, so to be good, i paste diff code here: {{{ diff -urN asio_old/ip/basic_resolver.hpp asio/ip/basic_resolver.hpp --- asio_old/ip/basic_resolver.hpp 2010-01-04 04:36:02.000000000 +0800 +++ asio/ip/basic_resolver.hpp 2010-12-20 22:02:33.369834300 +0800 @@ -237,6 +237,11 @@ { return this->service.async_resolve(this->implementation, e, handler); } + + void shutdown_service() + { + this->service.shutdown_service(); + } }; } // namespace ip diff -urN asio_old/ip/resolver_service.hpp asio/ip/resolver_service.hpp --- asio_old/ip/resolver_service.hpp 2010-01-04 04:36:02.000000000 +0800 +++ asio/ip/resolver_service.hpp 2010-12-20 21:56:38.610543300 +0800 @@ -78,6 +78,7 @@ /// Destroy all user-defined handler objects owned by the service. void shutdown_service() { + service_impl_.shutdown_service(); } /// Construct a new resolver implementation. }}} " Feature Requests closed To Be Determined asio Boost 1.42.0 Not Applicable wontfix boost asio resolve thread