wasi: make WasiSched::sleep fallible
some systems do not support sleeping and may want to return EINVAL here.
This commit is contained in:
@@ -10,7 +10,7 @@ use subscription::{MonotonicClockSubscription, RwSubscription, Subscription, Sub
|
||||
pub trait WasiSched {
|
||||
fn poll_oneoff(&self, poll: &Poll) -> Result<(), Error>;
|
||||
fn sched_yield(&self) -> Result<(), Error>;
|
||||
fn sleep(&self, duration: Duration);
|
||||
fn sleep(&self, duration: Duration) -> Result<(), Error>;
|
||||
}
|
||||
|
||||
pub struct Userdata(u64);
|
||||
|
||||
Reference in New Issue
Block a user