pub struct UringCompletionPump<'a> { /* private fields */ }Expand description
Completion pump for an optional Linux io_uring stream.
Detached pumps report UringPollState::Detached instead of fabricating a
zero-completion observation.
Implementations§
Source§impl<'a> UringCompletionPump<'a>
impl<'a> UringCompletionPump<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a pipeline handle with no io_uring stream attached.
§Examples
use vyre_runtime::UringCompletionPump;
let pump = UringCompletionPump::new();
assert!(!pump.is_shutdown_requested());Sourcepub fn with_uring(self, stream: AsyncUringStream<'a>) -> Self
pub fn with_uring(self, stream: AsyncUringStream<'a>) -> Self
Attach an io_uring stream for GPU-visible reads. Linux-only.
Use uring::NvmeGpuIngestDriver::new_gpudirect when the caller
requires the native NVMe → BAR1 path instead of registered mapped reads.
Sourcepub fn poll(&mut self) -> Result<UringPollState, PipelineError>
pub fn poll(&mut self) -> Result<UringPollState, PipelineError>
Probe the attached io_uring stream for completions.
§Errors
Propagates any uring syscall error from the underlying ring.
Sourcepub fn request_shutdown(&mut self)
pub fn request_shutdown(&mut self)
Request graceful shutdown of the pipeline.
Sourcepub fn is_shutdown_requested(&self) -> bool
pub fn is_shutdown_requested(&self) -> bool
Whether shutdown has been requested.
Sourcepub unsafe fn wait_for_observable(
host_visible_addr: *const u32,
current: u32,
timeout_ns: u64,
) -> Result<(), PipelineError>
pub unsafe fn wait_for_observable( host_visible_addr: *const u32, current: u32, timeout_ns: u64, ) -> Result<(), PipelineError>
Block until the megakernel writes a new value into the
observable word. Uses futex_waitv on Linux 5.16+.
§Errors
PipelineError::NotLinuxon non-Linux hosts.PipelineError::IoUringSyscallon futex errors.
§Safety
host_visible_addr must be host-mapped and outlive this call.