std/sys/thread/
unsupported.rs1use crate::ffi::CStr;
2use crate::io;
3use crate::num::NonZero;
4use crate::time::Duration;
5
6pub struct Thread(!);
7
8pub const DEFAULT_MIN_STACK_SIZE: usize = 64 * 1024;
9
10impl Thread {
11 pub unsafe fn new(
13 _stack: usize,
14 _name: Option<&str>,
15 _p: Box<dyn FnOnce()>,
16 ) -> io::Result<Thread> {
17 Err(io::Error::UNSUPPORTED_PLATFORM)
18 }
19
20 pub fn join(self) {
21 self.0
22 }
23}
24
25pub fn available_parallelism() -> io::Result<NonZero<usize>> {
26 Err(io::Error::UNKNOWN_THREAD_COUNT)
27}
28
29pub fn current_os_id() -> Option<u64> {
30 None
31}
32
33pub fn yield_now() {
34 }
36
37pub fn set_name(_name: &CStr) {
38 }
40
41pub fn sleep(_dur: Duration) {
42 panic!("can't sleep");
43}