Is there a design pattern for managing a queue or a stack? For example, we are looking to manage a list of tasks. These tasks will be added to a group queue, users will then be able to pull off the queue and add them to their personal queue.
+2
A:
Design patterns can use queues and stacks, but the queues and stacks themselves don't really implement a design pattern, they implement an interface.
Queues are typically FIFO while stacks are LIFO.
Since many users might be using the data structures simultaneously, you should use proper synchronization to avoid concurrency issues.
Are you looking for concurrency-related design patterns to use?
Ben S
2009-11-09 19:16:44
+1
A:
Most frameworks provide some kind of queue and/or stack implementations. E.g. in .NET - System.Collections.Generic.Queue and System.Collections.Generic.Stack
AdamRalph
2009-11-09 19:18:44