<p>System.Collections.Generic.Queue<T> is a FIFO (first-in first-out) collection kind of data type. With an instance of a Queue<T>, you can enqueue things like messages and then dequeue them from a receiving component. The Queue<T> is thread-safe, meaning that you can invoke queue.Enqueue(myMessage) in one thread and safely invoke queue.Dequeue() in another thread, or from multiple threads. Invoking Dequeue() pulls the first item in the queue's collection and removes it from the queue while returning the item. This is a handy way to manage multiple sorts of data coming in from multiple sources or from multiple tasks, exposing a standard, sequential means of processing them.</p>
Get New Tutorials Delivered to Your Inbox
New tutorials will be sent to your Inbox once a week.