MCPcopy Create free account
hub / github.com/boostorg/asio / test_cancel

Function test_cancel

test/experimental/promise.cpp:199–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197}
198
199void test_cancel()
200{
201 boost::asio::io_context ctx;
202 boost::asio::steady_timer tim{ctx, std::chrono::seconds(10)};
203 boost::system::error_code ec;
204
205 {
206 auto p = test_cancel_impl(
207 tim, ec, boost::asio::experimental::use_promise);
208 }
209
210 ctx.run();
211
212 BOOST_ASIO_CHECK_MESSAGE(
213 ec == boost::asio::error::operation_aborted,
214 ec.message());
215}
216
217} // namespace promise
218

Callers

nothing calls this directly

Calls 2

test_cancel_implFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected