O'Reilly logo

C# 5.0 Unleashed by Bart De Smet

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Thread-Safe Collection Types

Even though we cover threading, synchronization, and related concepts in Chapters 29 through 31, this chapter is a good place to say a few things about thread safe use of collection types.

Multithreaded programming is becoming more and more important today, thanks to the introduction of processors with many cores. To speed up computation and harness the power of today’s hardware, you usually use threads to attempt to run different parts of a program in parallel. I’m explicitly saying attempt because a lot of factors may cause sequential execution, including the operating system’s scheduler behavior, blocking and locking, and so on.

Instead of digressing much further about the virtues and complexities of multithreaded ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required