| 131 | //------------------------------------------------------------------------------ |
| 132 | |
| 133 | void test_future() |
| 134 | { |
| 135 | // Test our asynchronous operation using the use_future completion token. |
| 136 | // This token causes the operation's initiating function to return a future, |
| 137 | // which may be used to synchronously wait for the result of the operation. |
| 138 | std::future<std::string> f = |
| 139 | async_read_input("Enter your name", boost::asio::use_future); |
| 140 | |
| 141 | std::string result = f.get(); |
| 142 | std::cout << "Hello " << result << "\n"; |
| 143 | } |
| 144 | |
| 145 | //------------------------------------------------------------------------------ |
| 146 |
no test coverage detected