Summary
In this chapter, you've learned how to create production-ready concurrent code, how to handle race conditions, and how to make sure that your code is concurrent-safe. You've learned how to use channels to make your goroutines communicate with each other and how to stop their executions using the context.
You've worked on several techniques to handle concurrent computation. In many real-life scenarios, you might just use functions and methods that handle concurrency for you, especially if you're doing web programming, but there are cases where you have to handle the work coming from some different sources by yourself. You need to match requests with your response through different channels. You might need to gather different data into one single routine from different ones. With what you've learned here, you'll be able to do all that. You'll be able to ensure you do not lose data by waiting for all the Goroutines to finish. You'll be...