I have created a synchronized queue and am using SyncLock on the SyncRoot property of that queue when I invoke the Enqueue/Dequeue methods. The methods are invoked from instances of standard producer/consumer classes.
Is that a proper use of the SyncRoot property?
Would it be better practice to create a private shared object in each class and lock on that instead?
Please explain your reasoning.