Skip to Content
Parallel Programming with C# and .NET: Fundamentals of Concurrency and Asynchrony Behind Fast-Paced Applications
book

Parallel Programming with C# and .NET: Fundamentals of Concurrency and Asynchrony Behind Fast-Paced Applications

by Vaskaran Sarcar
September 2024
Intermediate to advanced content levelIntermediate to advanced
479 pages
6h 34m
English
Apress
Content preview from Parallel Programming with C# and .NET: Fundamentals of Concurrency and Asynchrony Behind Fast-Paced Applications
© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
V. SarcarParallel Programming with C# and .NEThttps://doi.org/10.1007/979-8-8688-0488-5_4

4. Working on Parallel Loops

Vaskaran Sarcar1  
(1)
Kolkata, West Bengal, India
 

C# developers are quite familiar with using foreach and for loops. By using these iteration statements, we can repeatedly execute a statement or a block of statements. This chapter primarily focuses on their parallel versions. It also helps you experiment with similar constructs that support parallel programming.

Revisiting Sequential Loops

Before we discuss parallel loops, let’s analyze a common scenario where you would usually use a loop. For example, given the code List<int> numbers = Enumerable.Range(1, ...

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.
Start your free trial

You might also like

Hands-On Parallel Programming with C# 8 and .NET Core 3.0

Hands-On Parallel Programming with C# 8 and .NET Core 3.0

Anton Selin

Publisher Resources

ISBN: 9798868804885Purchase LinkPublisher Website