MCPcopy Create free account
hub / github.com/NVIDIA/stdexec / async_single_shot

Function async_single_shot

test/exec/asio/test_completion_token.cpp:440–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

438
439 template <typename CompletionToken>
440 decltype(auto) async_single_shot(CompletionToken&& token)
441 {
442 using signature_type = void();
443 return asio_impl::async_initiate<CompletionToken, signature_type>(
444 [ptr = std::make_unique<int>(5)](auto&& h) { std::forward<decltype(h)>(h)(); },
445 token);
446 }
447
448 TEST_CASE("When appropriate the yielded sender is single shot", "[asioexec][completion_token]")
449 {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected