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

feat: add parking_lot as a feature #145

Closed
wants to merge 3 commits into from
Closed

Conversation

quake
Copy link

@quake quake commented May 7, 2021

resolve #137, a parking_lot feature flag is added to keep compatibility with old version.

@quake
Copy link
Author

quake commented Jun 7, 2021

@xacrimon could you help to review this PR?

run: cargo clippy --all-targets --all-features -- -D warnings

run: |
cargo clippy --all-targets --features rayon -- -D warnings
Copy link

Choose a reason for hiding this comment

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

Why switch from --all-features to manually specifying all 4 features?

Copy link
Author

Choose a reason for hiding this comment

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

it will report a false error regarding to feature switch:

cargo clippy --all-targets --all-features -- -D warnings

error[E0432]: unresolved import `crate::lock`
 --> src/set.rs:3:12
  |
3 | use crate::lock::RwLock;
  |            ^^^^ maybe a missing crate `lock`?

...

@dtzxporter
Copy link
Contributor

I ran this on production for a while and I ran into several deadlocks, seamingly more common on rust 1.52 than 1.50. May be worth investigating...

@pjenvey
Copy link

pjenvey commented Jun 12, 2021

I ran this on production for a while and I ran into several deadlocks, seamingly more common on rust 1.52 than 1.50. May be worth investigating...

@dtzxporter you're not holding Ref guards across await points, are you?

If not, were you seeing any deadlocks prior (w/out parking_lot)?

@dtzxporter
Copy link
Contributor

I am not, in fact, all of the locks were held internally to my structure which didn't have any async fn's.

I've had one segfault with dashmap before, so I'm not sure if it's related, but this was happening pretty much 80% of the time for me using parking_lot.

I've ended up removing dashmap entirely and switching to parking_lot:RwLock<HashMap<>> for now and it's been fine.

@xacrimon
Copy link
Owner

Hmm, may be related to llvm. Working on a switch to parking lot entirely.

@xacrimon
Copy link
Owner

Closing this, releasing v5 with parking_lot in a hot minute.

@xacrimon xacrimon closed this Dec 12, 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.

Feature request: Use parking_lot for RwLock
4 participants