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":
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:
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