Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm main executor object not defined #506

Open
sean-parent opened this issue Nov 2, 2022 · 0 comments
Open

wasm main executor object not defined #506

sean-parent opened this issue Nov 2, 2022 · 0 comments

Comments

@sean-parent
Copy link
Member

stlab/concurrency/main_executor.hpp:164:40: error: no member named 'main_executor_type' in namespace 'stlab::detail'
constexpr auto main_executor = detail::main_executor_type{};
                               ~~~~~~~~^
stlab/concurrency/main_executor.hpp:164:58: error: expected ';' after top level declarator
constexpr auto main_executor = detail::main_executor_type{};

And also, the wasm main executor can be improved:

Oh yes, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant