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

Function inline_executor_execute_test

test/inline_executor.cpp:100–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

98}
99
100void inline_executor_execute_test()
101{
102 boost::asio::detail::atomic_count count(0);
103
104 inline_executor().execute(bindns::bind(increment, &count));
105
106 boost::asio::require(inline_executor(),
107 boost::asio::execution::blocking.always
108 ).execute(bindns::bind(increment, &count));
109
110 boost::asio::prefer(inline_executor(),
111 boost::asio::execution::blocking.possibly
112 ).execute(bindns::bind(increment, &count));
113
114 boost::asio::any_completion_executor ex = inline_executor();
115
116 ex.execute(bindns::bind(increment, &count));
117
118 BOOST_ASIO_CHECK(count == 4);
119}
120
121void inline_executor_dispatch_test()
122{

Callers

nothing calls this directly

Calls 4

bindFunction · 0.50
requireFunction · 0.50
preferFunction · 0.50
executeMethod · 0.45

Tested by

no test coverage detected