MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / sleepWithCallback

Function sleepWithCallback

test/embind/test_val_coro.cpp:133–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131};
132
133callback_coro sleepWithCallback(std::function<void(int)>) {
134 co_await promise_sleep(1);
135 co_return 42;
136}
137
138void awaitInNonValCoro() {
139 sleepWithCallback([](int ret) { val::global("console").call<void>("log", ret); });

Callers 1

awaitInNonValCoroFunction · 0.85

Calls 1

promise_sleepFunction · 0.85

Tested by

no test coverage detected