Azzadal / ASP.NET-Core-Web-API

0 stars 0 forks source link

Где многопоточность KEKW #1

Open OnceDoter opened 3 years ago

OnceDoter commented 3 years ago

https://github.com/Azzadal/ASP.NET-Core-Web-API/blob/566a89eae90a3ce2eb1b6119f77a8c932ad29f22/WebTest/Controllers/CustomersController.cs#L52

Azzadal commented 3 years ago

В тесте, как просили в задании https://github.com/Azzadal/ASP.NET-Core-Web-API/blob/566a89eae90a3ce2eb1b6119f77a8c932ad29f22/WebTest.Tests/CustomersControllerTests.cs

пн, 28 сент. 2020 г., 1:46 Paul Gordeev notifications@github.com:

https://github.com/Azzadal/ASP.NET-Core-Web-API/blob/566a89eae90a3ce2eb1b6119f77a8c932ad29f22/WebTest/Controllers/CustomersController.cs#L52

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Azzadal/ASP.NET-Core-Web-API/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDHNMCS54LA2OMNRL47WTDSH6CAPANCNFSM4R3WY4SA .

jiggaaut commented 3 years ago

В тесте, как просили в задании https://github.com/Azzadal/ASP.NET-Core-Web-API/blob/566a89eae90a3ce2eb1b6119f77a8c932ad29f22/WebTest.Tests/CustomersControllerTests.cs пн, 28 сент. 2020 г., 1:46 Paul Gordeev notifications@github.com: https://github.com/Azzadal/ASP.NET-Core-Web-API/blob/566a89eae90a3ce2eb1b6119f77a8c932ad29f22/WebTest/Controllers/CustomersController.cs#L52 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDHNMCS54LA2OMNRL47WTDSH6CAPANCNFSM4R3WY4SA .

Каким образом, если контроллер блокируется на время исполнения 1 потоком?

Azzadal commented 3 years ago

В тесте, как просили в задании https://github.com/Azzadal/ASP.NET-Core-Web-API/blob/566a89eae90a3ce2eb1b6119f77a8c932ad29f22/WebTest.Tests/CustomersControllerTests.cs пн, 28 сент. 2020 г., 1:46 Павел Гордеев notifications@github.com : https://github.com/Azzadal/ASP.NET-Core-Web-API/blob/566a89eae90a3ce2eb1b6119f77a8c932ad29f22/WebTest/Controllers/CustomersController.cs#L52

Каким образом, если контроллер блокируется на время исполнения 1 потоком?

Прошу прощения, не увидел сообщение сразу. Я понял свою ошибку. Нужно использовать транзакции и блокировать изменение счета отдельного клиента.