.NET中的Thread类有一个静态方法Yield。
我在coreclr implementation of Thread中看到了该方法。
但是documentation没有包含该方法的描述。
同时,.NET CLI(dotnet build)无法编译带有该方法调用的代码。
为什么?
更新
运行时版本:
1.0.0-rc1-update1 coreclr x64 darwin
project.json
{
"version": "1.0.0-*",
"compilationOptions":
{
"emitEntryPoint": true
},
"dependencies":
{
"NETStandard.Library": "1.0.0-rc2-*",
"System.Threading": "4.0.11-rc3-*"
},
"frameworks": {
"dnxcore50": {}
}
}
更新2
我不打算使用Thread.Yield();
我只是想知道为什么一些框架特性在coreclr中不存在。
Thread.Yield
?我非常确定有比使用Thread.Yield
更好的方法来完成你要做的事情,尤其是当你的目标是coreCLR时。 - Luaan