Test project on how to avoid race conditions
A race condition occurs when two or more threads or processes attempt to modify a variable or resource simultaneously, potentially causing unpredictable behavior in the application. To mitigate this issue, I created this test example to prevent it from happening. Can you find more about this solution at Microsoft article.
# Download
$ git clone LINK-GITHUB-PROJECT && cd test-race-condition
# Install libs and dependencies
$ dotnet restore
# Build application
$ dotnet build
# Start
dotnet run api/api.csproj
Run on: localhost
To test, you need to make two simultaneous requests in debug
This work is licensed under MIT License.