© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2022
A. FreemanPro Gohttps://doi.org/10.1007/978-1-4842-7355-5_14

14. Using Goroutines and Channels

Adam Freeman1  
(1)
London, UK
 
Go has excellent support for writing concurrent applications, using features that are simpler and more intuitive than any other language I have used. In this chapter, I describe the use of goroutines, which allow functions to be executed concurrently, and channels, through which goroutines can produce results asynchronously. Table 14-1 puts goroutines and channels in context.
Table 14-1

Putting Goroutines and Channels in Context

Question

Answer

What are they?

Goroutines are lightweight threads created and managed by the Go runtime. Channels ...

Get Pro Go: The Complete Guide to Programming Reliable and Efficient Software Using Golang 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.