Queue vs FIFO Buffer
The Queue is a type of FIFO data structure. If you were wondering why I created my own FIFO Buffer, here are the key differences between them:
- A Queue can not be fixed size. It keeps growing as you add more items to it. The FIFO Buffer is specified a fixed size and it throws away older items as you add items and the size exceeds.
- You can not remove items randomly from a Queue. They must be removed by using the Dequeue method, in the order in which they were added.
That's all there is! So if these two features are not a required, you should rather use the built in generic Queue class.
Posted on March 13, 2009 07:14 by
Haider