4.3. Threading

Threading has been tweaked in .NET 4.0, with the thread pool switching to a lock-free data structure (apparently the queue used for work items is very similar to ConcurrentQueue). This new structure is more GC-friendly, faster, and more efficient.

Prior to .NET 4.0, the thread pool didn't have any information about the context in which the threads were created, which made it difficult to optimize (e.g., whether one thread depends on another). This situation changes in .NET 4.0 with a new class called Task that provide more information to the thread pool about the work to be performed, thus allowing it to make better optimizations. Tasks and other parallel and threading changes are covered in detail in Chapter 5.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.220.16