PIbd-21 Potapov N.S. LabWork06 #7

Closed
ns.potapov wants to merge 36 commits from LabWork06 into LabWork05
Showing only changes of commit e0ccb4f889 - Show all commits

View File

@ -12,6 +12,7 @@ namespace SecuritySystemBusinessLogic.BusinessLogics
{
private readonly ILogger _logger;
private readonly IOrderStorage _orderStorage;
static readonly object locker = new object();
public OrderLogic(ILogger<OrderLogic> logger, IOrderStorage orderStorage)
{
@ -74,7 +75,10 @@ namespace SecuritySystemBusinessLogic.BusinessLogics
public bool TakeOrderInWork(OrderBindingModel model)
{
return ChangeStatus(model, OrderStatus.Выполняется);
lock (locker)
{
return ChangeStatus(model, OrderStatus.Выполняется);
}
}
public bool FinishOrder(OrderBindingModel model)