From 55d9ff989941b4448926662771cdfce8840cf6cf Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" <75863576+jeffwashington@users.noreply.github.com> Date: Mon, 20 Sep 2021 09:57:57 -0500 Subject: [PATCH] WaitableCondVar supports notify_one (#20013) --- runtime/src/waitable_condvar.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runtime/src/waitable_condvar.rs b/runtime/src/waitable_condvar.rs index 8ad7e33662..b83441c0c9 100644 --- a/runtime/src/waitable_condvar.rs +++ b/runtime/src/waitable_condvar.rs @@ -15,6 +15,9 @@ impl WaitableCondvar { pub fn notify_all(&self) { self.event.notify_all(); } + pub fn notify_one(&self) { + self.event.notify_one(); + } pub fn wait_timeout(&self, timeout: Duration) -> bool { let lock = self.mutex.lock().unwrap(); let res = self.event.wait_timeout(lock, timeout).unwrap();