Update components/salsa-2022/src/storage.rs

This commit is contained in:
Niko Matsakis 2022-12-29 11:37:06 -05:00 committed by GitHub
parent f1a775c355
commit ce4b041048
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -176,6 +176,8 @@ where
DB: HasJars,
{
fn drop(&mut self) {
// Drop the Arc reference before the cvar is notified,
// since other threads are sleeping, waiting for it to reach 1.
drop(self.shared.jars.take());
self.shared.cvar.notify_all();
}