std/sys/sync/condvar/
no_threads.rs1use crate::sys::sync::Mutex;
2use crate::thread::sleep;
3use crate::time::Duration;
4
5pub struct Condvar {}
6
7impl Condvar {
8 #[inline]
9 pub const fn new() -> Condvar {
10 Condvar {}
11 }
12
13 #[inline]
14 pub fn notify_one(&self) {}
15
16 #[inline]
17 pub fn notify_all(&self) {}
18
19 pub unsafe fn wait(&self, _mutex: &Mutex) {
20 panic!("condvar wait not supported")
21 }
22
23 pub unsafe fn wait_timeout(&self, _mutex: &Mutex, dur: Duration) -> bool {
24 sleep(dur);
25 false
26 }
27}