You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This lock uses a task-fair locking policy which avoids both reader and writer starvation. This means that readers trying to acquire the lock will block even if the lock is unlocked when there are writers waiting to acquire the lock. Because of this, attempts to recursively acquire a read lock within a single thread may result in a deadlock.
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:
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: