Sha256: 4919984f5f20cfdf123cbeead22f74219521dac2af5968f3ea494c0bd1f11035
Contents?: true
Size: 558 Bytes
Versions: 16
Compression:
Stored size: 558 Bytes
Contents
use wasi_common::sched::{Duration, WasiSched}; use wasi_common::{Error, Poll}; pub struct NoopScheduler; impl NoopScheduler { pub fn new() -> NoopScheduler { NoopScheduler {} } } #[async_trait::async_trait] impl WasiSched for NoopScheduler { async fn poll_oneoff<'a>(&self, _poll: &mut Poll<'a>) -> anyhow::Result<(), Error> { Ok(()) } async fn sched_yield(&self) -> anyhow::Result<(), Error> { Ok(()) } async fn sleep(&self, _duration: Duration) -> anyhow::Result<(), Error> { Ok(()) } }
Version data entries
16 entries across 16 versions & 1 rubygems