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

Mutex access in the examples should not use .try_lock().unwrap() #7

Open
flupke opened this issue Nov 12, 2024 · 0 comments
Open

Mutex access in the examples should not use .try_lock().unwrap() #7

flupke opened this issue Nov 12, 2024 · 0 comments

Comments

@flupke
Copy link

flupke commented Nov 12, 2024

Copy/pasting this code makes the code panic with a WouldBlock error when accessed from different threads. I think the examples should be safe by default, either by using .lock().unwrap(), or by handling locking errors.

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