-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows
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.
Metadata
Metadata
Assignees
Labels
A-runtimeArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflowsArea: std's runtime and "pre-main" init for handling backtraces, unwinds, stack overflows