What is the method monitor.enter method used for in ASP.NET. If someone could explain this with a example it would be very helpful.
Printable View
What is the method monitor.enter method used for in ASP.NET. If someone could explain this with a example it would be very helpful.
Monitors provide the most fundamental synchronization technique in the .NET
Framework.Monitor.Enter is called to acquire an exclusive lock on an object. Each call to Monitor.Enter should be complemented with a call to Monitor.Exit to release the lock.The idea is that only one thread can be "inside" the monitor at any one time.