Make emscripten_check_blocking_allowed() no-op in release builds - #18871
Merged
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.
Collaborator
|
We might want to dig a little into why this was deliberately done in #9579 |
Collaborator
sbc100
reviewed
Feb 28, 2023
| @@ -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': | |||
Collaborator
There was a problem hiding this comment.
The rest of this function seems like it should maybe be split into a separate test?
sbc100
reviewed
Feb 28, 2023
| @@ -3809,14 +3809,23 @@ def test_pthread_main_thread_blocking(self, name): | |||
| print('Test that we error if not ALLOW_BLOCKING_ON_MAIN_THREAD') | |||
Collaborator
There was a problem hiding this comment.
Can you remove this print statement, or turn it into docstring?
sbc100
approved these changes
Feb 28, 2023
kripken
approved these changes
Feb 28, 2023
Member
|
This lgtm - @sbc100 did you have further comments? Looks like your previous ones were addressed. |
sbc100
approved these changes
Mar 6, 2023
Member
|
(Merging in latest main may help with the tests.) |
impact-maker
pushed a commit
to impact-maker/emscripten
that referenced
this pull request
Mar 17, 2023
…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.
impact-maker
pushed a commit
to impact-maker/emscripten
that referenced
this pull request
Mar 17, 2023
…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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This warning should only be raised when linking with
-sASSERTIONSor-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.