pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
// Provided method
fn block_thread_for_io(
&mut self,
source_fd: FileDescriptionRef<dyn WithSource>,
interests: Interest,
timeout: Option<(TimeoutClock, TimeoutAnchor, Duration)>,
callback: DynUnblockCallback<'tcx>,
) { ... }
}Provided Methods§
Sourcefn block_thread_for_io(
&mut self,
source_fd: FileDescriptionRef<dyn WithSource>,
interests: Interest,
timeout: Option<(TimeoutClock, TimeoutAnchor, Duration)>,
callback: DynUnblockCallback<'tcx>,
)
fn block_thread_for_io( &mut self, source_fd: FileDescriptionRef<dyn WithSource>, interests: Interest, timeout: Option<(TimeoutClock, TimeoutAnchor, Duration)>, callback: DynUnblockCallback<'tcx>, )
Block the current thread until some interests on an I/O source are fulfilled or the optional timeout exceeded. The callback will be invoked when the thread gets unblocked.
There can be spurious wake-ups by the OS and thus it’s the callers responsibility to verify that the requested I/O interests are really ready and to block again if they’re not.