Skip to content

MTY_WaitPtr

chrisd1100 edited this page Apr 30, 2023 · 1 revision

Wait until signaled by the main JavaScript thread. Web only.

When providing a userEnv argument to the MTY_Start JavaScript function, it may become necessary to have the WebAssembly thread wait while running asynchronous code in JavaScript. All functions supplied via the userEnv argument will always run on the main JavaScript thread which is not allowed to block in any way. These functions should call MTY_SignalPtr when done with their asynchronous operations on a sync variable, which will then unblock the WebAssembly side waiting with MTY_WaitPtr.

void MTY_WaitPtr(
    int32_t * sync
);

Parameters

sync (int32_t *)

Pointer to arbitrary shared memory.

Platform support

Web  

See also

Module: App

Clone this wiki locally