Thoughts that's OK, even if there's an inconvenience for existing users.
At least, we know in advance that something might break, so that's fine :)
Maybe instead of "throwing", just reporting an error in the web console
would be sufficient though. If "STRICT=1" is set (which should be
probably encouraged in the doc btw), then it would really throw, unless
a flag is explicitly set. Well, that's just an idea..
Le 18/10/2019 à 20:12, Alon Zakai a écrit :
See
https://github.com/emscripten-core/emscripten/pull/9579
in which we propose to throw when doing a pthread_join or another
operation on the main thread which can block for a nontrivial amount
of time. The possible deadlocks that can hit have been a serious
problem for new users of pthreads on the Web.
You can still use pthread_join etc. on the main thread, you just need
to flip a flag. The error by default points people to the docs that
explain the possible risks, and hopefully encourages people to use
alternatives (like not blocking, or using PROXY_TO_PTHREAD, etc., all
mentioned in those docs).
This will slightly inconvenience existing users (that will see an
error and must then flip the flag) but should help new users avoid
confusing deadlocks, which I think is a reasonable tradeoff.
Thoughts?
- Alon
--
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]
<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpTYBTZfZXOEDKJ%3DeStJePW1WbU%3Dtu4jKZJpyPushKMgTA%40mail.gmail.com
<https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpTYBTZfZXOEDKJ%3DeStJePW1WbU%3Dtu4jKZJpyPushKMgTA%40mail.gmail.com?utm_medium=email&utm_source=footer>.
--
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/fc8d30b9-47d5-3ab8-bd7f-4a40f3dcde16%40gmail.com.