When we create a new thread in this way:
Threading.Thread t = new Threading.Thread(() => { Console.WriteLine("My New thread"); });
t.Start();
Is it going to create an OS level thread as well?
Technically this is undefined, a custom CLR host can use any construct to implement a thread. The underlying hosting interface is IClrTask. Nor is there a decent way to find out.
Practically this never happens. IClrTask was added at the request of the SQL Server group which wanted the option to map a thread onto a fiber. That project ultimately failed, they could not get it stable enough. A red flag to anybody that might have had similar plans. Unless you are acting as a plugin to a large unmanaged program similar to SQL Server, you can always assume you'll consume an OS thread.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With