![]() |
Home | Libraries | People | FAQ | More |
After the exception has been caught, the boost::asio::io_service::run() call may be restarted without the need for an intervening call to boost::asio::io_service::reset(). This allows the thread to rejoin the io_service's thread pool without impacting any other threads in the pool.
boost::asio::io_service io_service; ... for (;;) { try { io_service.run(); break; // run() exited normally } catch (my_exception& e) { // Deal with exception as appropriate. } }
Copyright © 2003 - 2006 Christopher M. Kohlhoff |