The CLR can be hosted and exposes mechanisms for the host to implement its own task abstraction. Theoretically, they can be threads, fibers, LWPs - anything as long as the host implements the necessary interfaces.
Getting it right is somewhat hard. MS took a chance on it in order to host the CLR in SQL Server Fiber Mode.
At the last moment, there were some stress bugs, so they pulled the plug on it according to Joe Duffy and Dino Vhieland (who ran a series about writing a custom CLR host that implements its own task abstraction - with fibers - on his blog).
Right now there is some plumbing missing - ICLRTask::SwitchOut()
- and even if one gets around that, the same bugs that hit MS at the stress test iteration would probably haunt the adventurous soul as well.
Suppose for a moment that all the problems are somehow fixed and the whole runtime is prepared to run on fibers, LWPs, whatever. There is still the problem of P/Invoke that might potentially call into blocking operations. This kind of scheduling is hard to do without kernel support.
This is addressed in the 64bit versions of Windows 7 and Windows 2008 Server R2. There is now User-Mode Scheduling that can yield control back to a user-mode - as opposed to kernel-mode - scheduler if a call blocks in the kernel. Also, these user-mode scheduled threads are real threads with their own TLS. These are great improvements and make many of the fiber mode headaches go away.
Right now, UMS is utilized in the Concurrency Runtime that is available for C++ and is part of the C Runtime Library (CRT).
The latter means that you can use it out of the box with Visual Studio 2010.