MCPcopy Create free account
hub / github.com/Naios/continuable / using_strand

Function using_strand

examples/example-asio/example-asio-integration.cpp:161–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159}
160
161void 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}

Callers 1

mainFunction · 0.85

Calls 4

async_onFunction · 0.85
through_postFunction · 0.85
thenMethod · 0.80
runMethod · 0.80

Tested by

no test coverage detected