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

Any plan for EVAL_CTORS supporting in multi-threaded app? #20028

Open
junyuecao opened this issue Aug 14, 2023 · 2 comments
Open

Any plan for EVAL_CTORS supporting in multi-threaded app? #20028

junyuecao opened this issue Aug 14, 2023 · 2 comments

Comments

@junyuecao
Copy link
Contributor

There is an option for emcc to speed up the initializaton but it seems not supported for multi-threaded app.
https://emscripten.org/docs/optimizing/Optimizing-Code.html#eval-ctors

Is threre any plan to support in multi-threaded app?

@junyuecao junyuecao changed the title Plan for EVAL_CTORS supporting in multi-threaded app Any plan for EVAL_CTORS supporting in multi-threaded app? Aug 14, 2023
@kripken
Copy link
Member

kripken commented Aug 14, 2023

The error is

error: library_pthread.js: library_pthread.js:23: #error "EVAL_CTORS is not compatible with pthreads yet (passive segments)"

which is correct, I think. The ctor-evaller would need to support passive segments, that is, segments that it can't see their absolute location at compile time, somehow.

I am not aware of current work on this, but it would be good to add eventually, and there has been other work on the ctor-evaller recently (e.g. support for WasmGC).

@sbc100
Copy link
Collaborator

sbc100 commented Aug 14, 2023

I think if we fix #12682 then I think this would be possible.

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

3 participants