stlab / libraries

ASL libraries will be migrated here in the stlab namespace, new libraries will be created here.
https://stlab.cc
Boost Software License 1.0
660 stars 65 forks source link

WASM main_executor improvements #517

Open sean-parent opened 1 year ago

sean-parent commented 1 year ago

From an external conversation:

A simpler solution using the new API (https://emscripten.org/docs/api_reference/proxying.h.html) would be to create a new em_proxying_queue then use emscripten_proxy_asyc to send work to the main thread with it. No need for the double indirection in your previous solution. The proxied work will be automatically executed whenever the main thread returns to the event loop, just like in your previous solution, but without any code running during cancellation points.