From ce4b04104813acb55c88d9c37562eec634e0a84b Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 29 Dec 2022 11:37:06 -0500 Subject: [PATCH] Update components/salsa-2022/src/storage.rs --- components/salsa-2022/src/storage.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/salsa-2022/src/storage.rs b/components/salsa-2022/src/storage.rs index 12337e07..13c2e853 100644 --- a/components/salsa-2022/src/storage.rs +++ b/components/salsa-2022/src/storage.rs @@ -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(); }