-
Notifications
You must be signed in to change notification settings - Fork 222
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
[Feature Request] panic when user try get recursive lock. #438
Comments
I came here to make the same feature request: |
I'm not opposed to having this as an optional feature, but you need to be aware that this will severely hurt performance. Essentially this will require a thread-local |
Yes, it will hurt performance. But it's very useful for debug. ;) |
I'm happy to accept a PR if you are willing to write one. |
I am glad to hear this. I will try to take time to do this. |
I had notice that rwlock is not a recursive lock:
That is to say, I cannot acquire the read lock and write lock at the same time in one thread.
On Linux, trying to acquire a recursive lock on a non-recursive lock causes the program to crash. Should packing_lot also have this behavior? Crashing the program early can reduce debugging time (especially for problems like deadlocks)
The text was updated successfully, but these errors were encountered: