Glossary: System Design Basics in C#
lock
Also written: lock block
A C# statement that lets only one thread at a time run the code inside its block. It is used to make a check-and-subtract on stock atomic and to model a database transaction.
Glossary: System Design Basics in C#
Also written: lock block
A C# statement that lets only one thread at a time run the code inside its block. It is used to make a check-and-subtract on stock atomic and to model a database transaction.