-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Make emscripten_check_blocking_allowed()
no-op in release builds
#18871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This warning should only be raised when linking with `-sASSERTIONS` or `-sALLOW_BLOCKING_ON_MAIN_THREAD=0`, where the latter setting would treat this warning with a higher severity (i.e., causing the program to abort when the main thread is blocked). Previously, this warning was always raised on web environments when not linking with `-sMINIMAL_RUNTIME`. Resolves: emscripten-core#18855.
We might want to dig a little into why this was deliberately done in #9579 |
test/test_browser.py
Outdated
@@ -3809,14 +3809,23 @@ def test_pthread_main_thread_blocking(self, name): | |||
print('Test that we error if not ALLOW_BLOCKING_ON_MAIN_THREAD') | |||
self.btest(test_file('pthread/main_thread_%s.cpp' % name), expected='abort:Blocking on the main thread is not allowed by default.', args=['-O3', '-sUSE_PTHREADS', '-sPTHREAD_POOL_SIZE', '-sALLOW_BLOCKING_ON_MAIN_THREAD=0']) | |||
if name == 'join': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rest of this function seems like it should maybe be split into a separate test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test/test_browser.py
Outdated
@@ -3809,14 +3809,23 @@ def test_pthread_main_thread_blocking(self, name): | |||
print('Test that we error if not ALLOW_BLOCKING_ON_MAIN_THREAD') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this print
statement, or turn it into docstring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This lgtm - @sbc100 did you have further comments? Looks like your previous ones were addressed. |
(Merging in latest main may help with the tests.) |
…mscripten-core#18871) This warning should only be raised when linking with `-sASSERTIONS` or `-sALLOW_BLOCKING_ON_MAIN_THREAD=0`, where the latter setting would treat this warning with a higher severity (i.e., causing the program to abort when the main thread is blocked). Previously, this warning was always raised on web environments when not linking with `-sMINIMAL_RUNTIME`. Resolves: emscripten-core#18855.
…mscripten-core#18871) This warning should only be raised when linking with `-sASSERTIONS` or `-sALLOW_BLOCKING_ON_MAIN_THREAD=0`, where the latter setting would treat this warning with a higher severity (i.e., causing the program to abort when the main thread is blocked). Previously, this warning was always raised on web environments when not linking with `-sMINIMAL_RUNTIME`. Resolves: emscripten-core#18855.
This warning should only be raised when linking with
-sASSERTIONS
or-sALLOW_BLOCKING_ON_MAIN_THREAD=0
, where the latter setting would treat this warning with a higher severity (i.e., causing the program to abort when the main thread is blocked).Previously, this warning was always raised on web environments when not linking with
-sMINIMAL_RUNTIME
.Resolves: #18855.