EMSCRIPTEN_FETCH_SYNCHRONOUS in the main thread #19169
Unanswered
aharondavid
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Calling to emscripten_fetch with EMSCRIPTEN_FETCH_SYNCHRONOUS in the main thread can't be done.
so,I get over on it by the following code (c++):
I know all about the risks when we lock the main thread, but, the above sample extremely simplify porting our c++ code to emscripten.
In Chrome\Edge, the above code is works. this is due to, I guess, to the fact that XMLHttpRequest doesn't going through the main thread.
In others browsers like Firefox, Safari, etc. the above code is stuck because of a dead lock.
do you think, in this case, that it's a matter of time that others browser will behave like Chrome\Edge ?
do you think that I shouldn't rely on the current behave of Chrome\Edge ?
Beta Was this translation helpful? Give feedback.
All reactions