void ThriftServer::cleanUp() { DCHECK(!serverChannel_); // It is users duty to make sure that setup() call // should have returned before doing this cleanup idleServer_.clear(); serveEventBase_ = nullptr; stopListening(); // Stop the routing handlers. for (auto& handler : routingHandlers_) { handler->stopListening(); } if (stopWorkersOnStopListening_) { // Wait on the i/o worker threads to actually stop stopWorkers(); } // Now clear all the handlers routingHandlers_.clear(); // Force the cred processor to stop polling if it's set up tlsCredProcessor_.reset(); }
void ThriftServer::cleanUp() { // It is users duty to make sure that setup() call // should have returned before doing this cleanup serveEventBase_ = nullptr; stopListening(); if (stopWorkersOnStopListening_) { // Wait on the i/o worker threads to actually stop stopWorkers(); } }
void RequestServer<SpecificCommandRunner>::executeStop() { stopWorkers(); }