| 159 | } |
| 160 | |
| 161 | void using_strand() { |
| 162 | asio::io_context ioc(1); |
| 163 | asio::io_context::strand strand(ioc); |
| 164 | |
| 165 | asio::post(strand, cti::use_continuable).then([]() { |
| 166 | puts("Dispatched through initiation token"); |
| 167 | }); |
| 168 | |
| 169 | cti::async_on( |
| 170 | []() mutable { |
| 171 | puts("Dispatched through executor"); |
| 172 | }, |
| 173 | through_post(strand)); |
| 174 | |
| 175 | ioc.run(); |
| 176 | } |
no test coverage detected