Makes a thread-safe queue.
- queue
- The Queue to make a thread-safe version of
The thread-safe version of the Queue passed in.
C# Example
using System.Collections; Queue NonThreadSafeQueue = new Queue(); Queue ThreadSafeQueue = Queue.Synchronized(NonThreadSafeQueue);Note:A Queue can be tested for thread-safeness through the Queue.IsSynchronized property.
Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0