1 Commits

Author SHA1 Message Date
Cutieguwu
71675d0771 Update io.rs 2026-01-01 14:40:51 -05:00

View File

@@ -20,6 +20,18 @@ pub fn get_stream_length<S: Seek>(stream: &mut S) -> io::Result<u64> {
len len
} }
/*
* IO Error Poisoning:
*
* 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<File> { pub fn load_input() -> anyhow::Result<File> {
OpenOptions::new() OpenOptions::new()
.read(true) .read(true)