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

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.29/src/noop_scheduler.rs
wasmtime-28.0.0 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.28/src/noop_scheduler.rs
wasmtime-27.0.0 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.27/src/noop_scheduler.rs
wasmtime-26.0.0 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.26/src/noop_scheduler.rs
wasmtime-25.0.2 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.25/src/noop_scheduler.rs
wasmtime-25.0.1 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.25/src/noop_scheduler.rs
wasmtime-25.0.0 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.25/src/noop_scheduler.rs
wasmtime-24.0.0 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.24/src/noop_scheduler.rs
wasmtime-23.0.2 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.23/src/noop_scheduler.rs
wasmtime-22.0.0 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.22/src/noop_scheduler.rs
wasmtime-21.0.1 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.22/src/noop_scheduler.rs
wasmtime-20.0.2 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.21/src/noop_scheduler.rs
wasmtime-20.0.0 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.21/src/noop_scheduler.rs
wasmtime-18.0.3 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.19/src/noop_scheduler.rs
wasmtime-17.0.1 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.18/src/noop_scheduler.rs
wasmtime-17.0.0 ./ext/cargo-vendor/deterministic-wasi-ctx-0.1.18/src/noop_scheduler.rs