Synchronization
April 27, 2020
Exclusive Locks lock(someObject){}Allow only one thread to access a certain section of code. unless and until the thread has not finished executing that code, no other thread will be able to enter.Alternative is to use Monitor.Enter/Monitor.Exit it’s only syntactical difference. behind the scenes, they have the same exact implementation. Two types of exclusive locks Lock Mutex If we give a name to a mutex , that mutex would be accessible…