From 128c323a7ea14005cf9d8bcd240b70a4a61614b1 Mon Sep 17 00:00:00 2001 From: Fenrir Date: Wed, 24 Jan 2018 00:53:46 -0700 Subject: [PATCH] Notify all threads when the write-lock goes out of scope --- ctr-std/src/sys/unix/rwlock.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctr-std/src/sys/unix/rwlock.rs b/ctr-std/src/sys/unix/rwlock.rs index 10162ef..76d2271 100644 --- a/ctr-std/src/sys/unix/rwlock.rs +++ b/ctr-std/src/sys/unix/rwlock.rs @@ -97,7 +97,7 @@ impl RWLock { pub unsafe fn write_unlock(&self) { self.mutex.lock(); *self.writer_active.get() = false; - self.cvar.notify_one(); + self.cvar.notify_all(); self.mutex.unlock(); }