Skip to content

Launching the Lock Poisoning Survey #708

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

Merged
merged 7 commits into from
Dec 11, 2020

Conversation

KodrAus
Copy link
Contributor

@KodrAus KodrAus commented Oct 12, 2020

We've been talking about running a survey to see how the standard library's locks are used in the wild. This post announces that survey along with a bit of a description of what poisoning is all about.

We started an FCP for the survey over here: rust-lang/libs-team#5

r? @sfackler @withoutboats

@KodrAus KodrAus requested a review from a team October 12, 2020 20:15
@bjorn3
Copy link
Member

bjorn3 commented Oct 12, 2020

You are only talking about poisoning as a way to maintain invariants, while in my opinion poisoning is just as much about easily propagating panics between threads, even when not taking panics into consideration, as .lock().unwrap() is easier to write than any way that doesn't propagate panics. This means that it is much harder to remain in a broken state where one thread has panicked and isn't restarted while all other threads keep going.

@KodrAus
Copy link
Contributor Author

KodrAus commented Oct 12, 2020

@bjorn3 The post comes around to that same conclusion, that lock poisoning is more a tool for propagating panics, rather than a tool for directly protecting from broken invariants.

@bjorn3
Copy link
Member

bjorn3 commented Oct 12, 2020

Missed that part.

@KodrAus
Copy link
Contributor Author

KodrAus commented Oct 12, 2020

It's a nice bit of validation to know you independently have a similar impression on what lock poisoning does and doesn't do 😁

@KodrAus
Copy link
Contributor Author

KodrAus commented Nov 11, 2020

I’ve just pushed a small update to the end of the post to be less strongly worded towards removing poisoning, since part of the survey will be telling us how useful it actually is for everyone.

I’ve also updated the publish date so I think we should be good to merge now!

@KodrAus
Copy link
Contributor Author

KodrAus commented Dec 9, 2020

@Mark-Simulacrum I think this one's just been waiting for some Core team approval for a while (but that might not have been very clear from the thread here). Would it be easier to publish if I targeted the insiders blog instead of the main one?

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to bump the date to Friday I think it'd be fine to merge this - left a few additional comments too

@KodrAus
Copy link
Contributor Author

KodrAus commented Dec 11, 2020

Thanks @Mark-Simulacrum 🙇 I’ve updated the post.

@Mark-Simulacrum Mark-Simulacrum merged commit f5b49d3 into rust-lang:master Dec 11, 2020
jackh726 pushed a commit to jackh726/blog.rust-lang.org that referenced this pull request Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants