| 209 | //------------------------------------------------------------------------------ |
| 210 | |
| 211 | void test_future() |
| 212 | { |
| 213 | // Test our asynchronous operation using the use_future completion token. |
| 214 | // This token causes the operation's initiating function to return a future, |
| 215 | // which may be used to synchronously wait for the result of the operation. |
| 216 | std::future<std::string> f = |
| 217 | async_read_input("Enter your name", boost::asio::use_future); |
| 218 | |
| 219 | std::string result = f.get(); |
| 220 | std::cout << "Hello " << result << "\n"; |
| 221 | } |
| 222 | |
| 223 | //------------------------------------------------------------------------------ |
| 224 |
no test coverage detected