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
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:
fnmain(){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.
The text was updated successfully, but these errors were encountered:
This is a result of the destructor bomb of Task going off too soon. I believe the correct action is being taken because failing to spawn a thread is indicative of an OOM situation which generally involves failing. This is certainly a bug in that it should not cause the runtime to abort, it should be a proper task failure at the very least.
If you use native threads and call
spawn()
too many times, the program will simply crash withapplication terminated abnormally with signal 9 (Killed)
.Example:
A
try_spawn(proc():Send) -> Result<(), ()>
could be a good addition too.The text was updated successfully, but these errors were encountered: