Skip to content

Control-C handler uses obsolete Thread.Abort #259

Description

@orent

Unhandled exception. System.PlatformNotSupportedException: Thread abort is not supported on this platform. at System.Threading.Thread.Abort(Object stateInfo) at Microsoft.Scripting.Hosting.Shell.BasicConsole.<.ctor>b__24_0(Object sender, ConsoleCancelEventArgs e) at Microsoft.Scripting.Hosting.Shell.BasicConsole.<.ctor>b__24_1(Object sender, ConsoleCancelEventArgs e) at System.Console.HandlePosixSignal(PosixSignalContext ctx) at System.Runtime.InteropServices.PosixSignalRegistration.<OnPosixSignal>g__HandleSignal|10_0(Object state) at System.Threading.Thread.StartCallback() Aborted (core dumped)

At first I assumed Thread.Abort is unsupported on Linux, but then I realized the API is now obsolete on all platforms. How hard would it be to add cancellation tokens and what would be the performance impact?

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