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

Function test_stick_on_main

test/exec/test_task.cpp:225–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223 }
224
225 auto test_stick_on_main(ex::scheduler auto sched1,
226 ex::scheduler auto sched2,
227 auto id_main_thread,
228 [[maybe_unused]] auto id1,
229 [[maybe_unused]] auto id2) -> exec::task<void>
230 {
231 CHECK(get_id() == id_main_thread);
232 co_await ex::schedule(sched1);
233 CHECK(get_id() == id_main_thread);
234 co_await ex::schedule(sched2);
235 CHECK(get_id() == id_main_thread);
236 co_await test_stick_on_main_nested(sched1, sched2, id_main_thread, id1, id2);
237 CHECK(get_id() == id_main_thread);
238 }
239
240 TEST_CASE("Stick on main thread if completes_inline is not used", "[types][sticky][task]")
241 {

Callers 1

test_task.cppFile · 0.85

Calls 3

get_idFunction · 0.85
scheduleFunction · 0.50

Tested by

no test coverage detected