S
Steven Spencer \(Spinalogic\)
Hey guys.
I come from a Java background and I'm familiar with monitors in java.
I ahve been reading about the .net monitors, including the Lock loops, and I
came across a question.
In most .net examples, there is a specific object (usually just of type
object) upon which the CLR creates the monitor and it is this object is used
to ensure no concurrency.
For instance if I was using something in the collections class, in java I
would just lock on the queue/list/array/map etc to ensure thread safe
access. Why is it that the majority of examples use a separate object?
I come from a Java background and I'm familiar with monitors in java.
I ahve been reading about the .net monitors, including the Lock loops, and I
came across a question.
In most .net examples, there is a specific object (usually just of type
object) upon which the CLR creates the monitor and it is this object is used
to ensure no concurrency.
For instance if I was using something in the collections class, in java I
would just lock on the queue/list/array/map etc to ensure thread safe
access. Why is it that the majority of examples use a separate object?