Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-2099

Stop TThreadPoolServer with alive connections.

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 0.9
    • Fix Version/s: 0.9.3
    • Component/s: C++ - Library
    • Labels:
      None
    • Environment:

      Ubuntu 12.04, Thrift 0.9, Nginx 1.4.1, Python 2.7.3, GCC 4.6.3

      Description

      Now if client of TThreadPoolServer kept alive connection (for example if requests to thrift-server are forwarded from nginx-server, which is set up so that the connections between him and thift-server are kept alive), method TThreadPoolServer::stop does not stopped server. It continues work until client (nginx-server) will not stopped.

      void StopThread(shared_ptr<EchoService> const &echo_service_handler,
      				shared_ptr<TThreadPoolServer> &server,
      				shared_ptr<ThreadManager> &thread_manager)
      {
      	while (echo_service_handler->GetRequestsCount() < 3)
      	{
      		sleep(1);
      	}
      	std::cout << "Stop service." << std::endl;
      	server->stop();
      }
      

      I think that ability to stop thrift-server with alive connections will be useful.

        Attachments

        1. EchoService.tar.gz
          13 kB
          Aleksey Zanin

          Issue Links

            Activity

              People

              • Assignee:
                jking3 James E. King III
                Reporter:
                lyobzik Aleksey Zanin
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: