在线程中找不到中止方法 [英] Can't find Abort method in Thread

查看:86
本文介绍了在线程中找不到中止方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将项目移植到.NET Core,并且对该方法有一些逻辑。您知道.NET Core在Thread类中支持 Abort()方法吗?

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?

推荐答案

Thread.Abort已在.NET Core中删除。

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

这篇关于在线程中找不到中止方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆