Applied Concurrency in Go
1h 28mIntermediate2022-01-26
Authors
Adelina Simion
Software Engineer and Technology Evangelist
Course details
Concurrency can be a confusing and intimidating topic to engineers, but it is an essential tool when writing production code as it allows you to write faster and more efficient solutions. In this course, Adelina Simion demystifies the intimidating topic of concurrency and showcases how to use the powerful tools of goroutines and channels. Go is designed with concurrency in mind so every developer should feel confident to use these powerful tools in their daily work. Join Adelina in this course to gain a thorough understanding of Go concurrency and learn how to apply it to solve some common engineering problems.
Skills covered
GoProgramming FoundationsGoogleProgramming LanguagesSoftware DevelopmentOne-Off
Concepts
Introduction
- Concurrency in daily life
- General prerequisites
- Prerequisite - The net http package
Goroutines and the Sync Package
- Concurrency vs. parallelism
- Goroutines basics
- The sync.WaitGroup
- Introducing the Orders app
- Race conditions
- The sync.Map
- The sync.Mutex
Channels
- Channel basics
- Channels in action
- Closing channels
- Ranging over channels
- The select statement
- Using channels in the Orders app
Concurrency Patterns
- Signaling work has finished
- Worker pools
- Contexts and cancellation
- Challenge - Extending the Orders app
- Solution - Extending the Orders app
Conclusion
- Continuing on with concurrency in Go