Ignore stdio mutex poison state#23468
Merged
Merged
Conversation
Nothing inside of the read/write interface itself can panic, so any poison must have been the result of user code which the lock isn't protecting.
Member
|
Hm, I think I tend to agree that ignoring poisoning is probably ok here. I was a little worried about this originally, but I think this works because you're right that the protected state is largely what it would affect and we know it can't panic (and we totally control it) so this should be fine. If something like rust-lang/rfcs#973 is implemented I'd be a little more worried, but I think it's safe to say that for our own internally managed buffers we'll guarantee that a panic won't happen. r=me with a test added |
Member
Author
Manishearth
added a commit
to Manishearth/rust
that referenced
this pull request
Mar 19, 2015
Nothing inside of the read/write interface itself can panic, so any poison must have been the result of user code which the lock isn't protecting. This seems safe to me, but if we don't want to go this route we should update the docs to indicate that these methods can panic. r? @alexcrichton
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.
Nothing inside of the read/write interface itself can panic, so any
poison must have been the result of user code which the lock isn't
protecting.
This seems safe to me, but if we don't want to go this route we should update the docs to indicate that these methods can panic.
r? @alexcrichton