Skip to content

Task panic should default to aborting process #19610

Description

@MichaelGG

It seems that currently (nightly 2014-12-05), the default behaviour for a panicking task is to kill the task but leave the process unharmed. That's undesireable by default, and should only happen on an opt-in manner when spawning, or a global handler. Otherwise it's too easy to have a critical task die and the process continues incorrectly. FWIW the CLR swallowed background exceptions in the first release but changed that behavior in V2.

Repro example:

fn main() {
   spawn(proc() { 
        panic!("worker is dead"); 
    });
    println!("{}", std::io::stdio::stdin().read_line());
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions