Last post Jan 12, 2011 06:50 PM by BatmanBond3D
Jan 09, 2011 03:12 AM|BatmanBond3D|LINK
I have a very simple piece of code that is not working as I would expect.
I would expect this line to deadlock when the 2nd Monitor.Enter(T) is called but for some reason the code keeps executing to completion! It seems that Monitor.Enter does not work at all. Does anyone know why?
Monitor.Enter Not Working
Jan 09, 2011 03:55 AM|ahsanmk|LINK
It is okay for the same thread to call Enter more than once without any sort of blocking but you need to call the Exit same number of times.
So, your code is running under one thread thats why its working fine.
Ahsan Muhammad Khan
Jan 12, 2011 06:50 PM|BatmanBond3D|LINK
Yes you are right, what I was looking for was