You are looking at the wrong file, the correct one is in the corefx depository. This one.
Note that it is special, it only contains declarations. It is the reference assembly, the one that your compiler uses. As you can tell, it does not have a Yield() method so a guaranteed eek! from the compiler. Distinguishing the reference assembly from the implementation assembly in the GAC is something that happened a long time ago, have a look-see at the C:\Program Files (x86)\Reference Assemblies directory on a Windows machine.
The exact reasons that a member or type is omitted is not always obvious. From what I've seen, factors that play a role are:
The type or member is simply not supported by the .NETCore version of the CLR. Originally designed to be a small version of the CLR that was targeted to mobile devices and easy to download, Silverlight is the most recognizable member of that family. With the additional feature that small also makes it easier to port the CLR to another platform, .NETCore served as the bootstrap of CoreCLR since making it run on Linux and OSX was a strong goal. AppDomain is a good example.
It might not yet have been implemented on every OS or it is in the wrong .NETStandard profile. Keeping it out of the reference assembly is a very simple way to prevent a program from accidentally using it and trigger a possibly very hard to diagnose runtime exception.
The .NET team wanted to deprecate it, CoreFx was a terrific opportunity to cut some dead wood or pursue a new best practice. Lots of examples of this, String.GetEnumerator() is one that usually stumps programmers, justification I heard from a team member that it isn't efficient enough. Obsolete .NET 1.x classes like ArrayList are more obvious.
I can't be sure why Thread.Yield() fell on the floor, but it is used heavily in the CoreCLR implementation (YieldProcessor and __SwitchToThread) so high odds that it fits bullet 3. Microsoft has been pushing hard to make their operating systems and frameworks more friendly to mobile devices, the kind of platform where they have not competed well. Threads are definitely not friendly.
Good odds that they want you to use Task.Yield() instead.
Thread.Yield
? I'm pretty sure there's a better way to do whatever you're doing than usingThread.Yield
, especially when you're targeting coreCLR. – Araarab