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 with the standard library #442

Merged
merged 1 commit into from
Sep 14, 2023
Merged

Replace parking_lot with the standard library #442

merged 1 commit into from
Sep 14, 2023

Conversation

yorickpeterse
Copy link
Contributor

Description

Historically parking_lot's locking types performed better, but since a few Rust releases ago the types provided by the standard library perform well enough. Replacing parking_lot also reduces the number of dependencies.

This fixes #419.

Related Issue

#419

How This Has Been Tested

By running cargo test --features llvm16-0 and the equivalent cargo check command.

Checklist

Historically parking_lot's locking types performed better, but
since a few Rust releases ago the types provided by the standard library
perform well enough. Replacing parking_lot also reduces the number of
dependencies.

See #419 for more details.
@@ -167,32 +167,32 @@ impl Target {
};

if config.base {
let _guard = TARGET_LOCK.write();
let _guard = TARGET_LOCK.write().unwrap_or_else(|e| e.into_inner());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I suppose this technically could be left as-is (i.e. without the unwrap), but I'm not a fan of just ignoring Result types.

@TheDan64 TheDan64 merged commit 21a7cc2 into TheDan64:master Sep 14, 2023
14 checks passed
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.

Consider replacing parking_lot::RwLock with the lock from the standard library
2 participants