Add more from the std
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
use crate::sys::sync::Mutex;
|
||||
use crate::thread::sleep;
|
||||
use crate::time::Duration;
|
||||
|
||||
pub struct Condvar {}
|
||||
|
||||
impl Condvar {
|
||||
#[inline]
|
||||
pub const fn new() -> Condvar {
|
||||
Condvar {}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn notify_one(&self) {}
|
||||
|
||||
#[inline]
|
||||
pub fn notify_all(&self) {}
|
||||
|
||||
pub unsafe fn wait(&self, _mutex: &Mutex) {
|
||||
panic!("condvar wait not supported")
|
||||
}
|
||||
|
||||
pub unsafe fn wait_timeout(&self, _mutex: &Mutex, dur: Duration) -> bool {
|
||||
sleep(dur);
|
||||
false
|
||||
}
|
||||
}
|
||||
1
library/std/src/sys/sync/condvar/no_threads.rs
Symbolic link
1
library/std/src/sys/sync/condvar/no_threads.rs
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/julien/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/sync/condvar/no_threads.rs
|
||||
Reference in New Issue
Block a user