WaitableCondVar supports notify_one (#20013)
This commit is contained in:
parent
bc7983b13e
commit
55d9ff9899
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue