CurrentThread/ProcessThread objects

前端 未结 2 1833
無奈伤痛
無奈伤痛 2021-01-16 03:01

In the .NET BCL, there is a CurrentThread and a ProcessThread object. What is the difference between these?

Thanks

2条回答
  •  不思量自难忘°
    2021-01-16 03:44

    The CurrentThread static property on the System.Threading.Thread class is the current CLR System.Threading.Thread instance. The CLR Thread is an abstraction over the underlying win32 thread. The System.Diagnostics.ProcessThread class gives one access to the win32 threads, largely for perfomance tracking.

    A key distinction of CLR threads is that they are not fixed to win32 threads.

提交回复
热议问题