Reference | Class Hierarchy | Class Index | Member Index |
After the exception has been caught, the asio::io_service::run() call may be restarted without the need for an intervening call to asio::io_service::reset(). This allows the thread to rejoin the io_service's thread pool without impacting any other threads in the pool.
asio::io_service io_service; ... for (;;) { try { io_service.run(); break; // run() exited normally } catch (my_exception& e) { // Deal with exception as appropriate. } }