Top "Queue" questions

A queue is an ordered, first-in-first-out data structure.

In C# would it be better to use Queue.Synchronized or lock() for thread safety?

I have a Queue object that I need to ensure is thread-safe. Would it be better to use a lock …

c# multithreading queue
Stack and Queue, Why?

Why and when should I use stack or queue data structures instead of arrays/lists? Can you please show an …

data-structures stack queue
Can I get an item from a PriorityQueue without removing it yet?

I want to get the next item in queue but I don't want to dequeue it. Is it possible in …

python python-3.x queue priority-queue peek
How to put items into priority queues?

In the Python docs, The lowest valued entries are retrieved first (the lowest valued entry is the one returned by …

python queue
Array-Based vs List-Based Stacks and Queues

I'm trying to compare the growth rates (both run-time and space) for stack and queue operations when implemented as both …

arrays data-structures stack queue linked-list
Sharing a result queue among several processes

The documentation for the multiprocessing module shows how to pass a queue to a process started with multiprocessing.Process. But …

python parallel-processing queue multiprocessing python-multiprocessing
How to iterate Queue.Queue items in Python?

Does anyone know a pythonic way of iterating over the elements of a Queue.Queue without removing them from the …

python queue producer-consumer
Get notification when NSOperationQueue finishes all tasks

NSOperationQueue has waitUntilAllOperationsAreFinished, but I don't want to wait synchronously for it. I just want to hide progress indicator in …

iphone asynchronous queue notifications nsoperation
RabbitMQ - Message order of delivery

I need to choose a new Queue broker for my new project. This time I need a scalable queue that …

queue rabbitmq message-queue
Queue<T> vs List<T>

I'm currently using a List<T> as a queue (use lst[0] then lst.removeAt(0)) to hold objects. There's …

.net performance list queue difference