Closed
Description
If you use native threads and call spawn()
too many times, the program will simply crash with application terminated abnormally with signal 9 (Killed)
.
Example:
fn main() {
use std::io::timer;
use std::iter;
for i in iter::count(1u, 1) {
println!("thread num: {}", i);
spawn(proc() {
timer::sleep(10000)
})
}
}
A try_spawn(proc():Send) -> Result<(), ()>
could be a good addition too.