Chapter 9. Leveraging Go concurrency

This chapter covers

  • Understanding concurrency and parallelism principles
  • Introducing goroutines and channels
  • Using concurrency in web applications

One of the things that Go is well known for is its ability to make writing concurrent programs easier and less susceptible to errors. This chapter introduces concurrency and discusses Go’s concurrency model and design. We’ll talk about the two main features of Go that provide concurrency: goroutines and channels. You’ll see an example of using Go concurrency in a web application to improve the app’s performance.

9.1. Concurrency isn’t parallelism

Concurrency is when two or more tasks start, run, and end within the same period of time and these tasks can ...

Get Go Web Programming 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.