加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – 在Mac上的.NET Core中的Thread.Sleep()

发布时间:2020-12-15 06:53:27 所属栏目:百科 来源:网络整理
导读:我在Mac机器上使用.NET Core. 在我的代码中,我想使用这段代码: System.Threading.Thread.Sleep(100); 但是在System.Threading命名空间中找不到Thread. 怎么了?不是线程可用于Mac,还是我缺少的东西? 解决方法 Isn’t Thread available for Mac? 还没有:ht
我在Mac机器上使用.NET Core.

在我的代码中,我想使用这段代码:

System.Threading.Thread.Sleep(100);

但是在System.Threading命名空间中找不到Thread.

怎么了?不是线程可用于Mac,还是我缺少的东西?

解决方法

Isn’t Thread available for Mac?

还没有:https://github.com/dotnet/corefx/issues/2576

The current System.Threading.Thread (and System.Threading.ThreadPool) packages only support desktop and CoreCLR.

和:https://github.com/dotnet/corefx/issues/2576#issuecomment-187184341

I can see that the latest System.Threading.Thread package in the dotnet-core NuGet feed hasn’t changed this picture.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读