-
Notifications
You must be signed in to change notification settings - Fork 79
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
Pipe i/o example in documentation is incorrect #164
Comments
It was pointed out in #164 that this example could be improved to follow proper practices.
Thanks for the feedback, @p-mongo. While the examples were meant to be illustrative rather than exhaustive/robust, given others are likely using them with the assumption they will do the "right thing", it's worthwhile to update them. I've done so in 8e809fe, and really appreciate your input! Wanted to address your specific points as I think they are worth discussing:
Thanks again for the feedback. We've updated the example. |
👍 thank you. |
The output to pipe example provided in the readme has several issues:
r
).r.readpartial
complaining about the i/o object being closed by another thread. The main thread shouldjoin
the reading thread after waiting for the launched process before carrying on to close the reading end (per bullet 1). When I added this wait, the entire process hung due to bullet 2.I suggest using something along the following lines:
The text was updated successfully, but these errors were encountered: