How to use boost::asio to implement a synchronous operation with timeouts?
In the boost official documents, the example of timeouts in asio is implements by asynchronous operations and a deadline_timer. But what I want is a synchronous operation with a timeout, but I search nearly all of the reference manual and find nothing about it. In an other words, how can I used the asynchronous operations to simulate synchronous operations with timeouts. Maybe I could launch an asynchronous operation and call io_service::run_one immediately, but I don't know whether it is safe when I call io_service::run_one in a complete callback function which is call by io_service::run? Or there is any classic solution of this question. Thank you. -- View this message in context: http://old.nabble.com/How-to-use-boost%3A%3Aasio-to-implement-a-synchronous-... Sent from the Boost - Users mailing list archive at Nabble.com.
participants (1)
-
watsonsong