| 43 | } |
| 44 | |
| 45 | int main() |
| 46 | { |
| 47 | boost::asio::io_context ctx; |
| 48 | |
| 49 | boost::asio::steady_timer timer(ctx); |
| 50 | timer.expires_after(std::chrono::seconds(1)); |
| 51 | |
| 52 | async_wait_twice( |
| 53 | timer, |
| 54 | [](int result) |
| 55 | { |
| 56 | std::cout << "result is " << result << "\n"; |
| 57 | } |
| 58 | ); |
| 59 | |
| 60 | // Uncomment the following line to trigger an error in async_wait_twice. |
| 61 | //timer.cancel(); |
| 62 | |
| 63 | ctx.run(); |
| 64 | |
| 65 | return 0; |
| 66 | } |
nothing calls this directly
no test coverage detected