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

Consider sorting resources to avoid deadlock #305

Open
eloff opened this issue Sep 26, 2024 · 0 comments
Open

Consider sorting resources to avoid deadlock #305

eloff opened this issue Sep 26, 2024 · 0 comments

Comments

@eloff
Copy link

eloff commented Sep 26, 2024

If you run acquire([a,b]) and acquire([b,a]) this can deadlock. A simple precaution is to sort the list of resources first to ensure they're always acquired in the same order.

Or failing that, document that recommendation.

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

No branches or pull requests

1 participant