gh-94026: Workaround for BlockingIOError in runtest_mp on Emscripten#94164
Closed
tiran wants to merge 1 commit intopython:mainfrom
Closed
gh-94026: Workaround for BlockingIOError in runtest_mp on Emscripten#94164tiran wants to merge 1 commit intopython:mainfrom
tiran wants to merge 1 commit intopython:mainfrom
Conversation
Member
Author
|
@vstinner @serhiy-storchaka please take a look. I know that you enjoy I/O shenanigans :) |
…ipten `runtest_mp` test worker now handles :exc:`BlockingIOError` to work around non-blocking pipes on Emscripten.
| """ | ||
| data = data.encode(stream.encoding) | ||
| # flush buffers, just in case | ||
| stream.flush() |
vstinner
reviewed
Jun 23, 2022
Member
vstinner
left a comment
There was a problem hiding this comment.
A pipe can block. If you want to avoid errors when writing into a pipe: use a temporary named file instead.
Member
Author
|
A blocking pipe would not be an issue. The problem is that Emscripten on NodeJS uses a non-blocking pipe for standard streams. |
Member
Author
|
Closing in favor of approach #94253 |
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.
runtest_mptest worker now handles :exc:BlockingIOErrorto work aroundnon-blocking pipes on Emscripten.