//! `thread` on WASI: there is one thread.
usecrate::{ErrorKind,Result};pub(crate)constNAME_MAX:usize=0;#[link(wasm_import_module ="wasi_snapshot_preview1")]unsafeextern"C"{fnsched_yield()->i32;}pub(crate)fnid()->u64{1}pub(crate)fnyield_now(){// SAFETY: sched_yield takes nothing. Its only outcome of interest is
// that the host got to run something else.
let_=unsafe{sched_yield()};}pub(crate)fnavailable_parallelism()->Result<usize>{Ok(1)}pub(crate)fnset_name(_name:&str)->Result<()>{Err(ErrorKind::Unsupported.into())}pub(crate)fnname(_buf:&mut [u8])->Result<usize>{Err(ErrorKind::Unsupported.into())}