| 97 | } |
| 98 | |
| 99 | void defer_no_args_test() |
| 100 | { |
| 101 | io_context ctx(1); |
| 102 | |
| 103 | int handler_count = 0; |
| 104 | boost::asio::defer(boost::asio::deferred)( |
| 105 | boost::asio::bind_executor(ctx, |
| 106 | bindns::bind(void_handler, &handler_count))); |
| 107 | |
| 108 | BOOST_ASIO_CHECK(handler_count == 0); |
| 109 | |
| 110 | ctx.run(); |
| 111 | |
| 112 | BOOST_ASIO_CHECK(handler_count == 1); |
| 113 | } |
| 114 | |
| 115 | void defer_function_test() |
| 116 | { |