
10 May
2012
10 May
'12
7:03 p.m.
int main(int argc, char* argv[]) { boost::thread thrd_io(boost::bind(&boost::asio::io_service::run, &io_service));
The above will probably exit immediately, as it doesn't have work.
boost::thread workerThread(workerFunc); while ( true ) { try { io_service.run();
This one might also exit before another thread gives any work to the io_service. In short, try to create io_service::work before you call io_service::run() and see if it helps.