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

Function test_callback

example/cpp20/operations/callback_wrapper.cpp:93–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91//------------------------------------------------------------------------------
92
93void test_callback()
94{
95 boost::asio::io_context io_context;
96
97 // Test our asynchronous operation using a lambda as a callback. We will use
98 // an io_context to specify an associated executor.
99 async_read_input("Enter your name",
100 boost::asio::bind_executor(io_context,
101 [](const std::string& result)
102 {
103 std::cout << "Hello " << result << "\n";
104 }));
105
106 io_context.run();
107}
108
109//------------------------------------------------------------------------------
110

Callers 1

mainFunction · 0.70

Calls 2

async_read_inputFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected