Compare commits
1 Commits
1e80713263
...
read-poiso
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71675d0771 |
12
src/io.rs
12
src/io.rs
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user