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
priority queue: properly sync the waiter manipulation
As described in #3363,
there are some circumstances under which `GetWithPriority`
is not returning the correct/expected element.
This can happen when a `GetWithPriority` is executed
and the `Ascend` of the queue is not completed yet,
causing not all the items of the BTree to evaluate
the same w.waiters.Load() value.
Adding a lock to manipulate the waiters will solve the issue.
Since the lock is required, there is no need to use an
atomic.Int64 anymore.
Signed-off-by: fossedihelm <[email protected]>
0 commit comments