Postby guenter » 22 Jun 2010, 23:32
Sorry, I've missed an important detail...
You'll probably need a Poco::Event that you wait() for in you main thread (before joining the threads from the pool). When it's time to stop the TCPServer, set() the event object from another thread and the call to wait() will return. Many POCO-based server applications call Poco::Util::Application::waitForTerminationRequest() after setting up the TCPServer (or HTTPServer, etc.). waitForTerminationRequest() will block until the user enters CTRL-C or kills the process. You want something similar for your scripts.