Skip to content

Explore .NET Parallel Programming with C#. Delve into multithreading using Task Parallel Library (TPL) and Parallel LINQ (PLINQ). Learn task management, data synchronization, concurrent collections, task coordination, parallel loops, and async/await. Suitable for all skill levels.

License

Notifications You must be signed in to change notification settings

SalehAhmadi/parallel-programming-csharp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Parallel Programming in C#

Overview

This repository provides an in-depth exploration of .NET Parallel Programming with C#. It delves into the core multithreading facilities in the .NET Framework, specifically focusing on the Task Parallel Library (TPL) and Parallel LINQ (PLINQ).

Prerequisites

  • A basic understanding of C# and the .NET framework.
  • Familiarity with multithreading concepts.

Topics Included

  • Task Programming
    • Learn how to create, execute, cancel, and manage tasks, as well as handle exceptions that arise during task execution.
  • Data Sharing and Synchronization
    • Ensure safe and consistent access to shared data across multiple threads.
  • Concurrent Collections
    • Utilize thread-safe collections like ConcurrentBag for effective multi-threaded operations.
  • Task Coordination
    • Understand continuations and the use of synchronization primitives to coordinate tasks.
  • Parallel Loops
    • Implement parallel loops to efficiently iterate over counters or collections, partitioning data for processing across multiple threads.
  • Parallel LINQ (PLINQ)
    • Leverage the parallel version of Language-Integrated Query (LINQ) for improved data processing performance.
  • Async/Await
    • Explore .NET's asynchronous programming support to write non-blocking, scalable code.

Target Audience

This repository is designed for:

  • Beginner and experienced .NET/C# developers seeking to enhance their knowledge of parallel programming.
  • Computer Science students interested in modern multithreading and parallelism techniques.
  • Individuals keen on understanding and implementing asynchronous programming and parallel processing.

Usage

Since all examples are consolidated in this repository and the files are in .txt format, you can easily convert them back to the original .cs files by simply removing the .txt extension. This allows you to run and modify the code directly in your preferred C# development environment. To make the most of the materials in this repository, ensure you meet the outlined requirements.

Contributing

First off, thanks for taking the time to contribute! Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please try to create bug reports that are:

  • Reproducible. Include steps to reproduce the problem.
  • Specific. Include as much detail as possible: which version, what environment, etc.
  • Unique. Do not duplicate existing opened issues.
  • Scoped to a Single Bug. One bug per report.

Please adhere to this project's code of conduct.

You can use markdownlint-cli to check for common markdown style inconsistency.

Code of Conduct

Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Support

Reach out to the maintainer at:

License

This project is licensed under the MIT license. Feel free to edit and distribute this template as you like.

See LICENSE for more information.

About

Explore .NET Parallel Programming with C#. Delve into multithreading using Task Parallel Library (TPL) and Parallel LINQ (PLINQ). Learn task management, data synchronization, concurrent collections, task coordination, parallel loops, and async/await. Suitable for all skill levels.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published