Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evillegas92/parallel-programming-csharp
Parallel programming and thread safety in C#.
https://github.com/evillegas92/parallel-programming-csharp
Last synced: about 1 month ago
JSON representation
Parallel programming and thread safety in C#.
- Host: GitHub
- URL: https://github.com/evillegas92/parallel-programming-csharp
- Owner: evillegas92
- Created: 2023-05-05T08:52:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-05-05T13:43:26.000Z (over 1 year ago)
- Last Synced: 2024-11-06T00:40:49.676Z (3 months ago)
- Language: C#
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Parallel-programming-CSharp
Parallel programming and thread safety in C#.## Instructions
To run the code without thread safety, run `dotnet run -- 1`. This will print 'Done' twice because the same code was accessed by two different threads (the main thread and a new thread).To run the code with thread safety implemented, run `dotnet run -- 0`. This will only print 'Done' once because of the use of `lock` to shield part of the code from other threads.