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

Function test_callback

example/cpp14/operations/callback_wrapper.cpp:91–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls 2

async_read_inputFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected