© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
R. WienerGeneric Data Structures and Algorithms in Gohttps://doi.org/10.1007/978-1-4842-8191-8_6

6. Queues and Lists

Richard Wiener1  
(1)
Colorado Springs, CO, USA
 

Queue is another relatively simple data type. It has many practical uses in application development.

A queue organizes data in a first-in, first-out (FIFO) manner. Because of FIFO, the most obvious application is to model a waiting line. This could be a line of customers waiting for some service, a print job waiting in a print queue, a concurrent process waiting for CPU access, and many other applications that require waiting lines. New items are inserted into the back of a queue, and items are removed ...

Get Generic Data Structures and Algorithms in Go: An Applied Approach Using Concurrency, Genericity and Heuristics now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.