Lock and monitor in C#

added by DotNetKicks
12/15/2017 7:49:41 AM

2 Kicks, 402 Views

Working on some threading stuff I stumbled upon some discussions about lock and Monitor. Some say they are different and some say they are the same. I took few minutes of time to make some simple experiments with both of these. This blog post shows what C# compiler does with lock statement.