System.Collections.Queue
class has Queue.Synchronized
method which returns a thread-safe Queue implementation.
But the generic one, System.Collections.Generic.Queue
does not have a Synchronized
method. At this point I have two questions in mind:
- Why doesn't generic one have this method? Is it a framework API design decision?
- How is the queue returned from
Queue.Synchronized
is different thanConcurrentQueue<T>
class?
Thanks.