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

Not use the "sync_guard" feature of parking_lot #174

Closed
nullchinchilla opened this issue Jan 20, 2022 · 2 comments
Closed

Not use the "sync_guard" feature of parking_lot #174

nullchinchilla opened this issue Jan 20, 2022 · 2 comments

Comments

@nullchinchilla
Copy link

dashmap uses the sync_guard feature of parking_lot. However, in my codebase, I use parking_lot throughout, and I intentionally want parking_lot guards to not be Sync, as defense against accidentally keeping them across .await points (which can easily lead to deadlocks).

But I cannot do so unless I downgrade dashmap to v4, because dashmap will turn on the sync_guard feature for me. This has caused several accidental deadlocks in my code already.

Can this be controlled at least by a feature flag? I don't want dashmap Refs to be Sync either.

@xacrimon
Copy link
Owner

xacrimon commented Feb 5, 2022

This will be fixed in next v5. V5 is currently yanked due to a vulnerability and I'd recommend downgrading ASAP.

@xacrimon
Copy link
Owner

xacrimon commented Feb 6, 2022

Fixed by #179

@xacrimon xacrimon closed this as completed Feb 6, 2022
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.

2 participants