Skip to content

Commit

Permalink
(sqlite) do not drop notify mutex until after condvar is triggered (#…
Browse files Browse the repository at this point in the history
…2573)

Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
  • Loading branch information
andrewwhitehead authored Jun 30, 2023
1 parent 1b7631e commit 3fbc3a3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sqlx-sqlite/src/statement/unlock_notify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ impl Notify {
}

fn fire(&self) {
*self.mutex.lock().unwrap() = true;
let mut lock = self.mutex.lock().unwrap();
*lock = true;
self.condvar.notify_one();
}
}

0 comments on commit 3fbc3a3

Please sign in to comment.