Github user jeking3 commented on a diff in the pull request: https://github.com/apache/thrift/pull/980#discussion_r60591056 --- Diff: lib/cpp/src/thrift/server/TThreadedServer.cpp --- @@ -90,31 +95,71 @@ TThreadedServer::~TThreadedServer() { } void TThreadedServer::serve() { + threadFactory_->setDetached(false); --- End diff -- I don't see an easy way around this. The threaded server must be able to join. The caller could pass a non-detached ThreadManager into the ctor and then setDetached(true) before or while serve() is running - there are a variety of things we cannot control. The default behavior is to use a detached ThreadManager, so if I changed this to a check with an invalid_argument or logic_error exception, there would have been more work to do in the default simple thread manager static factory and related calls. On line 38 of the header this behavior is documented, at least.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---