You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: Error { repr: Os(1455) }'
Code found (& system-torture enhanced) from online Rust book Ch 3.3 (embed project example).
I'd modified the thread count from original 11 threads to 10,000,001 threads to see how / if a thread limit would be reached. I'm assuming this may be the initial cause for the panic, however Os(1455) doesn't really describe an Error's repr very well.
_As I'm not completely familiar with Rust, I was advised to submit this as an issue by someone more familiar with the language._
See (modified) code example below for repro:
use std::thread;
fn main() {
let handles: Vec<_> = (0..10_000_000).map(|_| {
thread::spawn(|| {
let mut _x = 0;
for _ in (0..5_000_001) {
_x += 1
}
})
}).collect();
for h in handles {
h.join().ok().expect("Could not join a thread");
}
}