Compare commits
1 Commits
53d773e2ea
...
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
|
||||
}
|
||||
|
||||
/*
|
||||
* 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> {
|
||||
OpenOptions::new()
|
||||
.read(true)
|
||||
|
||||
Reference in New Issue
Block a user