我在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.