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

Function expect_empty

test/exec/async_scope/test_spawn_future.cpp:18–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16namespace
17{
18 void expect_empty(exec::async_scope& scope)
19 {
20 ex::run_loop loop;
21 ex::scheduler auto sch = loop.get_scheduler();
22 CHECK_FALSE(ex::execute_may_block_caller(sch));
23 auto op = ex::connect(ex::then(scope.on_empty(),
24 [&]()
25 {
26 loop.finish();
27 }),
28 expect_void_receiver{ex::prop{ex::get_scheduler, sch}});
29 ex::start(op);
30 loop.run();
31 }
32
33#if !STDEXEC_NO_STDCPP_EXCEPTIONS()
34 //! Sender that throws exception when connected

Callers 1

Calls 6

thenFunction · 0.85
on_emptyMethod · 0.80
startFunction · 0.50
get_schedulerMethod · 0.45
finishMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected