Provides a thread-safe queue. Any number of threads can add elements to the end of the queue or remove elements from the head.