File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
system/include/emscripten Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -188,6 +188,10 @@ void emscripten_lock_busyspin_waitinf_acquire(emscripten_lock_t *lock __attribut
188188// NOTE: This function can be called in both main thread and in Workers. If you
189189// use this API in Worker, you cannot utilise an infinite loop programming
190190// model.
191+ // NOTE 2: This function will always acquire the lock asynchronously. That is,
192+ // the lock will only be attempted to acquire after current control flow
193+ // yields back to the browser, so that the Wasm call stack is empty.
194+ // This is to guarantee an uniform control flow.
191195void emscripten_lock_async_acquire (emscripten_lock_t * lock __attribute__((nonnull )),
192196 emscripten_async_wait_volatile_callback_t asyncWaitFinished __attribute__((nonnull )),
193197 void * userData ,
You can’t perform that action at this time.
0 commit comments