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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAEX4NpTYBTZfZXOEDKJ%3DeStJePW1WbU%3Dtu4jKZJpyPushKMgTA%40mail.gmail.com.

Reply via email to