I wanted to try out `upstream-latest`, to absorb the impact of 
"Asyncify"...looks like a superior answer to our emterpreter build, and so 
far seems fine!  Nice work!

But this latest version seems to be causing problems with the 
USE_PTHREADS=1 build.  As far as I can tell, it's ignoring the 
`MAIN_THREAD_` part of MAIN_THREAD_EM_ASM().  If the request is submitted 
from a worker, it still runs on the worker.  (The same code works as 
expected in an older emsdk version, for instance with `emcc --version` of 
1.38.28.)

I dug a little into what might have changed in the code, and it looks like 
things have definitely become more nuanced, with "proxied function 
invokers":

https://github.com/emscripten-core/emscripten/commit/60e47eff970c97b52772470806d2c81b3b1a32bf#diff-cc4345db19ff44863e9122c74e9f383fR1728

I'm a bit worried about this line in particular:

    @no_wasm_backend('Proxying EM_ASM calls is not yet implemented in Wasm 
backend')

Discussed some here as well:

https://github.com/emscripten-core/emscripten/pull/6189#discussion_r227360878

I'm not clear on what backend it would work on if not WASM, as there 
doesn't seem to be pthreads support for the JS backend.  (?)

Is MAIN_THREAD_EM_ASM() supposed to work?  I didn't cook up a minimal 
example to test it, due to seeing these comments (and my usage seems pretty 
straightforward).  But if it's believed to be an error in my usage I can 
look deeper into it, just wanted to check on the meaning of these "not 
implemented" remarks first.

Thanks,
--Brian
http://hostilefork.com

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/c97732a3-9626-48dc-8c47-0ec83caca0ac%40googlegroups.com.

Reply via email to