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

Method anIntAPI

test/exec/test_create.cpp:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46 void anIntAPI(int a, int b, void* context, void (*completed)(void* context, int result))
47 {
48 // Execute some work asynchronously on some other thread. When its
49 // work is finished, pass the result to the callback.
50 scope_.spawn(ex::starts_on(pool_.get_scheduler(),
51 ex::then(ex::just(),
52 [=]() noexcept
53 {
54 auto result = a + b;
55 completed(context, result);
56 })));
57 }
58
59 void aVoidAPI(void* context, void (*completed)(void* context))
60 {

Callers

nothing calls this directly

Calls 3

thenFunction · 0.85
spawnMethod · 0.80
get_schedulerMethod · 0.45

Tested by

no test coverage detected