Standard library, synchronization primitives, and undefined behavior


#21

@Amanieu Are you going to write an RFC? What can we do to help push this forward?


#22

There is a PR for using the parking_lot code inside of libstd now: https://github.com/rust-lang/rust/pull/56410


#23

If/when this PR is adopted, the Rust cheat sheet will need to be updated for Mutex<T>, since the new parking_lot code does not have a poison field. That would also be a good opportunity to add the missing RwLock<T> to the cheat sheet.


#24

Even with that PR, Mutex will remain backwards-compatible and hence still have poison. It will just use the parking_lot machinery for implementing mutual exclusion, instead of leaving that to OS primitives.