Concurrent Collections
Parallel computing relies on multithreading, although with some particular specifications for taking advantage of multicore architectures. The real problem is when you need to work with collections because in a multithreaded environment, multiple threads could access a collection attempting to make edits that need to be controlled. The .NET Framework 4.6 retakes from its predecessor a number of thread-safe concurrent collections, exposed by the System.Collections.Concurrent namespace, which is useful in parallel computing with .NET Framework because they grant concurrent access to their members from threads.
What Does Thread-Safe Mean?
A collection is thread-safe when it remains correct despite any number of threads invoking ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access