lowLock must be locked before highLock in the queue #5

Merged
lunny merged 1 commits from zeripath/levelqueue:lock-order into master 2021-08-14 13:14:25 +00:00
Contributor

Unfortunately the locking order in the queue.Close() function is
incorrect as the queue.Len() function locks the lowLock before the
highLock. We therefore must lock the lowLock before the highLock.

Signed-off-by: Andrew Thornton art27@cantab.net

Unfortunately the locking order in the queue.Close() function is incorrect as the queue.Len() function locks the lowLock before the highLock. We therefore must lock the lowLock before the highLock. Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added 1 commit 2021-08-14 09:30:18 +00:00
lowLock must be locked before highLock in the queue
Unfortunately the locking order in the queue.Close() function is
incorrect as the queue.Len() function locks the lowLock before the
highLock.  We therefore must lock the lowLock before the highLock.

Signed-off-by: Andrew Thornton <art27@cantab.net>
All checks were successful
continuous-integration/drone/pr Build is passing
604fc041ac
lunny approved these changes 2021-08-14 13:14:21 +00:00
lunny merged commit 47d1e224cd into master 2021-08-14 13:14:25 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/levelqueue#5
No description provided.