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

Method proxyAsync

system/include/emscripten/proxying.h:258–265  ·  view source on GitHub ↗

Return true if the work was successfully enqueued and false otherwise. Refer to the corresponding C API documentation.

Source from the content-addressed store, hash-verified

256 // Return true if the work was successfully enqueued and false otherwise.
257 // Refer to the corresponding C API documentation.
258 bool proxyAsync(pthread_t target, std::function<void()>&& func) {
259 std::function<void()>* arg = new std::function<void()>(std::move(func));
260 if (!emscripten_proxy_async(queue, target, runAndFree, (void*)arg)) {
261 delete arg;
262 return false;
263 }
264 return true;
265 }
266
267 bool proxySync(const pthread_t target, const std::function<void()>& func) {
268 return emscripten_proxy_sync(queue, target, run, (void*)&func);

Callers 1

test_proxy_asyncFunction · 0.80

Calls 2

moveFunction · 0.85
emscripten_proxy_asyncFunction · 0.50

Tested by 1

test_proxy_asyncFunction · 0.64