{"id":24472471,"url":"https://github.com/lukaofirst/parallel-programming-dotnet","last_synced_at":"2026-05-17T12:33:17.854Z","repository":{"id":273079776,"uuid":"918646185","full_name":"lukaofirst/parallel-programming-dotnet","owner":"lukaofirst","description":"This repository contains all my practices and lessons about Parallel Programming in .NET","archived":false,"fork":false,"pushed_at":"2025-01-18T13:51:41.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T15:04:55.285Z","etag":null,"topics":["concurrency","concurrent-collections","concurrent-dictionary","concurrent-queue","concurrent-stack","dotnet","dotnet-core","lock","multithreading","mutex","parallel-programming","parallelism","plinq","threadsafe"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lukaofirst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-18T13:43:53.000Z","updated_at":"2025-01-18T13:51:43.000Z","dependencies_parsed_at":"2025-01-18T15:05:20.067Z","dependency_job_id":"c7c83608-9485-4401-a206-ff169a1723e6","html_url":"https://github.com/lukaofirst/parallel-programming-dotnet","commit_stats":null,"previous_names":["lukaofirst/parallel-programming-dotnet"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaofirst%2Fparallel-programming-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaofirst%2Fparallel-programming-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaofirst%2Fparallel-programming-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukaofirst%2Fparallel-programming-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukaofirst","download_url":"https://codeload.github.com/lukaofirst/parallel-programming-dotnet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243591755,"owners_count":20315903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concurrency","concurrent-collections","concurrent-dictionary","concurrent-queue","concurrent-stack","dotnet","dotnet-core","lock","multithreading","mutex","parallel-programming","parallelism","plinq","threadsafe"],"created_at":"2025-01-21T08:12:25.248Z","updated_at":"2026-05-17T12:33:17.824Z","avatar_url":"https://github.com/lukaofirst.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eParallel Programming in .NET\u003c/h1\u003e\n\u003c/div\u003e\n\nThis repository provides examples and exercises on parallel programming in .NET, covering synchronization mechanisms, concurrent collections, task coordination, parallel loops, and Parallel LINQ.\n\n-   \u003cb\u003eMain Topics Learned\u003c/b\u003e\n\n    -   **Concurrency != Parallelism**:\n\n        -   **Concurrency**: It's the capacity to handle multiple tasks at once\n\n        -   **Parallelism**: It's the capacity to execute multiple tasks at once\n\n    -   **Concurrency Synchronization**: Covers different synchronization mechanisms to manage concurrent access to shared resources\n\n    -   **Concurrent Collections**: Covers the usage of thread-safe collections\n\n    -   **Task Coordination**: Covers different techniques to coordinate tasks\n\n    -   **Parallel Loops**: Covers the use of parallel loops to perform parallel operations on collections\n\n    -   **Parallel LINQ**: Covers the usage of PLINQ (Parallel LINQ) to perform parallel operations on collections\n\n-   **Topics in Details**\n\n    -   **Concurrency Synchronization**\n\n        -   **LockSync**: Demonstrates the use of `lock` statement to synchronize access to a shared resource.\n\n        -   **Interlocked**: Shows how to use `Interlocked` class for atomic operations on shared variables.\n\n        -   **SpinLockSync**: Explains the use of `SpinLock` for low-level synchronization.\n\n        -   **MutexSync**: Demonstrates the use of `Mutex` for inter-process synchronization.\n\n        -   **ReaderWriterLockSync**: Shows how to use `ReaderWriterLockSlim` to allow multiple readers or exclusive access to a resource.\n\n    -   **Concurrent Collections**\n\n        -   **ListAndConcurrentBag**: Compares the use of `List` with locks and `ConcurrentBag` for thread-safe operations.\n\n        -   **DictionaryAndConcurrentDictionary**: Compares the use of `Dictionary` with locks and `ConcurrentDictionary` for thread-safe operations.\n\n        -   **QueueAndConcurrentQueue**: Compares the use of `Queue` with locks and `ConcurrentQueue` for thread-safe operations.\n\n        -   **StackAndConcurrentStack**: Compares the use of `Stack` with locks and `ConcurrentStack` for thread-safe operations.\n\n    -   **Task Coordination**\n\n        -   **Task Continuation**: Demonstrates how to chain tasks using continuations.\n\n        -   **Child Tasks**: Shows how to create and manage child tasks.\n\n        -   **Barrier**: Explains the use of `Barrier` to synchronize multiple tasks at a specific point.\n\n        -   **Countdown Event**: Demonstrates the use of `CountdownEvent` to wait for multiple tasks to signal completion.\n\n        -   **Reset Event**: Shows how to use `ManualResetEventSlim` for signaling between tasks.\n\n        -   **Semaphore**: Demonstrates the use of `SemaphoreSlim` to limit the number of concurrent tasks.\n\n    -   **Parallel Loops**\n\n        -   **Parallel Invoke**: Demonstrates the use of `Parallel.Invoke` to run multiple actions in parallel.\n\n        -   **ForEach and ForEachAsync**: Shows how to use `Parallel.ForEach` and `Parallel.ForEachAsync` for parallel iteration over collections.\n\n        -   **For and ForAsync**: Demonstrates the use of `Parallel.For` and `Parallel.ForAsync` for parallel iteration with indices.\n\n        -   **Thread Local Storage**: Explains the use of thread-local storage in parallel loops.\n\n        -   **Partitioning**: Shows how to partition data for parallel processing.\n\n        -   **Handling Exceptions**: Demonstrates how to handle exceptions in parallel loops.\n\n    -   **Parallel LINQ**\n\n        -   **AsParallel**: Demonstrates the use of `AsParallel` to enable parallel processing of LINQ queries.\n\n        -   **ParallelQuery**: Shows how to create and use `ParallelQuery` for parallel LINQ operations.\n\n        -   **Handling Cancellations and Exceptions**: Explains how to handle cancellations and exceptions in PLINQ queries.\n\n        -   **Merge Options**: Demonstrates the use of merge options to control the buffering behavior of PLINQ queries.\n\n        -   **Custom Aggregations**: Shows how to perform custom aggregations in PLINQ queries.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaofirst%2Fparallel-programming-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukaofirst%2Fparallel-programming-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukaofirst%2Fparallel-programming-dotnet/lists"}