5.2. Important Concepts

Parallelism and threading are confusing, and there are a few questions many developers have (see the following questions).

5.2.1. Why Do I Need These Enhancements?

Can't you just create lots of separate threads? Well, you can, but there are a couple of issues with this approach. First, creating a thread is a resource-intensive process, so (depending on the type of work you do) it might be not be the most efficient or quickest way to complete a task. Creating too many threads, for example, can slow task completion because threads are never given time to complete as the operating system rapidly switches between them. And what happens if someone loads up two instances of your application?

To avoid some of these issues, ...

Get Introducing .NET 4.0: with Visual Studio 2010 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.