Skip to content
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

Replace parking_lot mutexes with stdlib #216

Closed
nnmm opened this issue Jul 4, 2022 · 3 comments · Fixed by #232
Closed

Replace parking_lot mutexes with stdlib #216

nnmm opened this issue Jul 4, 2022 · 3 comments · Fixed by #232

Comments

@nnmm
Copy link
Contributor

nnmm commented Jul 4, 2022

Starting with Rust 1.62, the standard lib mutexes have roughly equal performance to parking_lot: rust-lang/rust#95035

IMO we could replace parking_lot with the standard lib mutexes throughout our code.

@jhdcs
Copy link
Collaborator

jhdcs commented Jul 5, 2022

This looks pretty good to me! It will help reduce the size of the library as well!

The only snag I can foresee is that we will have to deal with the possibility of poisoned Mutexes again, unless std did away with that?

@nnmm
Copy link
Contributor Author

nnmm commented Jul 5, 2022

Yes, the lock() calls will be slightly uglier, but lock poisoning is a safety feature, so I'd say it's a net win.

@esteve
Copy link
Collaborator

esteve commented Jul 5, 2022

Sounds good to me. The more we can use from stdlib the better 🙂

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 a pull request may close this issue.

3 participants