Sha256: 2646717b9f20c3a00775ec0dbc709b56b24159c30a7df90061037c4311c9dd73

Contents?: true

Size: 669 Bytes

Versions: 14

Compression:

Stored size: 669 Bytes

Contents

use crate::sync::sched::windows::poll_oneoff_;
use crate::tokio::block_on_dummy_executor;
use crate::{file::WasiFile, sched::Poll, Error};

pub async fn poll_oneoff<'a>(poll: &mut Poll<'a>) -> Result<(), Error> {
    // Tokio doesn't provide us the AsyncFd primitive on Windows, so instead
    // we use the blocking poll_oneoff implementation from the wasi_common::sync impl.
    // We provide a function specific to this impl's WasiFile types for downcasting
    // to a RawHandle.
    block_on_dummy_executor(move || poll_oneoff_(poll, wasi_file_is_stdin))
}

pub fn wasi_file_is_stdin(f: &dyn WasiFile) -> bool {
    f.as_any().is::<crate::tokio::stdio::Stdin>()
}

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/wasi-common-29.0.0/src/tokio/sched/windows.rs
wasmtime-28.0.0 ./ext/cargo-vendor/wasi-common-28.0.0/src/tokio/sched/windows.rs
wasmtime-27.0.0 ./ext/cargo-vendor/wasi-common-27.0.0/src/tokio/sched/windows.rs
wasmtime-26.0.0 ./ext/cargo-vendor/wasi-common-26.0.0/src/tokio/sched/windows.rs
wasmtime-25.0.2 ./ext/cargo-vendor/wasi-common-25.0.2/src/tokio/sched/windows.rs
wasmtime-25.0.1 ./ext/cargo-vendor/wasi-common-25.0.1/src/tokio/sched/windows.rs
wasmtime-25.0.0 ./ext/cargo-vendor/wasi-common-25.0.0/src/tokio/sched/windows.rs
wasmtime-24.0.0 ./ext/cargo-vendor/wasi-common-24.0.0/src/tokio/sched/windows.rs
wasmtime-23.0.2 ./ext/cargo-vendor/wasi-common-23.0.2/src/tokio/sched/windows.rs
wasmtime-22.0.0 ./ext/cargo-vendor/wasi-common-22.0.0/src/tokio/sched/windows.rs
wasmtime-21.0.1 ./ext/cargo-vendor/wasi-common-21.0.1/src/tokio/sched/windows.rs
wasmtime-20.0.2 ./ext/cargo-vendor/wasi-common-20.0.2/src/tokio/sched/windows.rs
wasmtime-20.0.0 ./ext/cargo-vendor/wasi-common-20.0.0/src/tokio/sched/windows.rs
wasmtime-18.0.3 ./ext/cargo-vendor/wasi-common-18.0.3/src/tokio/sched/windows.rs