mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-05 20:42:54 +00:00
SeqWait: don't do wakeups under the lock
Clippy pointed out that `drop(waiters)` didn't do anything, because there was a misplaced ";" causing `waiters` to be a unit type `()`. This change makes it do what was intended: the lock should be dropped first, then the wakeups should be processed.
This commit is contained in:
@@ -63,7 +63,7 @@ impl SeqWait {
|
||||
|
||||
// This will steal the entire waiters map.
|
||||
// When we drop it all waiters will be woken.
|
||||
mem::take(&mut internal.waiters);
|
||||
mem::take(&mut internal.waiters)
|
||||
|
||||
// Drop the lock as we exit this scope.
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user