Skip to content

Conversation

IWANABETHATGUY
Copy link

@IWANABETHATGUY IWANABETHATGUY commented Oct 11, 2022

Summary

parking_lot is not always the best choice after rust stable 1.62 https://blog.rust-lang.org/2022/06/30/Rust-1.62.0.html#thinner-faster-mutexes-on-linux

  1. Make parking_lot an optional dependency
  2. Adding a new feature parking_lot_support to let user enable the optional dependency parking_lot
  3. Adding the feature parking_lot_support to the default_features list to avoid breaking changes.

@IWANABETHATGUY
Copy link
Author

Here is the benchmark for current std::sync::Mutex rust-lang/rust#95035 (comment), It is 10 times faster than parking_lot::Mutex when the extreme contention scenario, although not all platforms have been migrated to Mutex with futex based ones (e.g. MacOs ), more details you could refer to rust-lang/rust#93740

@bors-servo
Copy link
Contributor

☔ The latest upstream changes (presumably #268) made this pull request unmergeable. Please resolve the merge conflicts.

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.

2 participants