Learn about RACE CONDITIO N
How do you usually handle race conditions? What kind of thinking process and what tools are used?
From what I've researched, I often use
Besides that, there are also SemaphoreSlim, lock, interlocked, etc. Each is used for a different purpose.
Currently, I only know about the simplest case: a single order, but two boxes are clicked to buy the product at the SAME TIME. In this case, you have to apply a race condition. :))))))))
From what I've researched, I often use
using var transaction = _context.Database.BeginTransaction();Besides that, there are also SemaphoreSlim, lock, interlocked, etc. Each is used for a different purpose.
Currently, I only know about the simplest case: a single order, but two boxes are clicked to buy the product at the SAME TIME. In this case, you have to apply a race condition. :))))))))
