At first, a thread is a managed object, you know the System.Threading.Thread class. Now this is an internal CLR object, the C ++ class is also called Thread. There, rather, a huge amount of plumbing is connected with an iceberg. This plumbing certainly uses kernel objects, five of them. Something you can see in Taskmgr.exe . One of them is its own handle to the operating system thread, the other four are a little mysterious, but they are probably handlers of synchronization objects.
Decoupling Thread with real Windows thread objects in .NET 2.0 is pretty sad. This is only technically possible, none of the famous people have ever implemented the CLR host, which made it work. This was an important project for the SQL Server team to implement Thread with fibers, and they abandoned it. Failed to make it reliable enough. Since then I donβt know.
Hans Passant Feb 17 2018-12-17T00: 00Z
source share