|
|
In providing services to people, and in computer science, transportation, and operations research a queue is a First-In-First-Out FIFO process- the first element in the queue will be the first one out. This is equivalent to the requirement that whenever an element is added, all elements that where added before have to be removed before the new element can be removed.
One imortant characteristic of a queue is that it does not have a specific capacity. Regardless of how many elements are already contained, a new element can always be added. It can also be empty, at which point removing an element will be impossible until a new element has been added again.
A practical implementation of a queue usually does have some sort of fuzzy capacity limit, that depends on the concrete situation it is used in. For a data structure the executing computer will eventually run out of memory, thus limiting the queue size. For a waiting queue of people, eventually there might not be enough space to squeeze into, or people might decide that the queue is alredy too long and not bother adding themselves to it.
For queueing people, see queue area.
In computer science, compare: