From: Nelson, E. - 2 <eri...@ba...> - 2010-04-08 15:41:46
|
on Thursday, April 08, 2010 3:23 Dean Michael Berris wrote: >>eri...@ba...> wrote: >> >> int main(int argc, char * argv[]) { >> try { >> ThreadServer thread_server("localhost", "3000"); >> boost::thread thread_(boost::bind(&ThreadServer::thread_func, boost::ref(thread_server))); >> hello_world handler; >> http::server<hello_world> server("localhost", "3000", handler); >> server.run(); >Here, you are blocking the current thread. >> thread_.join(); >And if ever you get here, the exception will throw. I think I confused the issue by bringing up the threads... maybe taking a step back, what would you expect to happen if two copies of hello_world_server.cpp are run simultaneously (separate processes, same hostname and port)? When I do that, I get no exception or any indication that one of them is not actually operating properly. Erik |