From 1607f7ebfa8f73d044a3567ef650136ad946e6a3 Mon Sep 17 00:00:00 2001 From: Cutieguwu Date: Thu, 1 Jan 2026 14:40:27 -0500 Subject: [PATCH] Update io.rs --- src/io.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/io.rs b/src/io.rs index 8d3f824..1521815 100644 --- a/src/io.rs +++ b/src/io.rs @@ -20,6 +20,24 @@ pub fn get_stream_length(stream: &mut S) -> io::Result { len } +/* + * IO Error Poisoning: + * + * + * Attempt 1: + * + * Wrap C calls w/ `ffi`. Most importantly, execute the `close()` through C. + * + * + * Attempt 2: + * + * Return to using safe-on-the-surface Rust, but attempt to execute the reads + * via a separate thread, hoping that the observed poisoning goes away with the + * thread being closed and doesn't affect the main thread. + * + * May need `mpsc` to transfer data without spawning a thread on every read. + */ + pub fn load_input() -> anyhow::Result { OpenOptions::new() .read(true)