Can't find Abort method in Thread

前端 未结 2 1579
生来不讨喜
生来不讨喜 2020-12-16 16:59

I\'m porting a project to .NET Core and have some logic with the method. Do you know .NET Core supports Abort() method in Thread class?

2条回答
  •  我在风中等你
    2020-12-16 17:48

    Thread.Abort has been removed in .NET Core.

    • Move Thread.Abort under FEATURE_LEGACYSURFACE https://github.com/dotnet/coreclr/pull/2342
    • Never call Thread.Abort https://github.com/aspnet/KestrelHttpServer/pull/726
    • for tests purpose the custom Abort Ext method is used

提交回复
热议问题