Returns a Queue wrapper that is synchronized (thread-safe).
[Visual Basic] Public Shared Function Synchronized( _ ByVal q As Queue _ ) As Queue [C#] public static Queue Synchronized( Queue q ); [C++] public: static Queue* Synchronized( Queue* q ); [JScript] public static function Synchronized( q : Queue ) : Queue;
A Queue wrapper that is synchronized (thread-safe).
Exception Type | Condition |
---|---|
ArgumentNullException | q is a null reference (in Visual Basic Nothing). |
To guarantee the thread-safety of the Queue, all operations must be done through this wrapper only.
Queue Class | Queue Members | System.Collections Namespace | IsSynchronized | SyncRoot