Working with Concurrency in Go (Golang)
Master concurrent programming in Go! Explore benefits & challenges of Go's concurrency features. Write efficient, scalable applications.
Course Content
Working with Concurrency in Go (Golang) is an intermediate-level Udemy course taught by Trevor Sawler. It runs 9h 44m, is taught in English, and includes a certificate of completion. Learners rate it 4.5 out of 5 from 1,662 reviews, with 14,601 students enrolled. It is a paid course, last updated June 2024.
Go (Golang) excels at concurrency, making it a popular choice for modern application development. The go keyword allows you to easily launch functions as GoRoutines, which run concurrently in the background. Go's built-in scheduler efficiently manages these concurrent tasks.
While Go simplifies concurrency initiation, mastering thread-safe programming requires careful planning and a deep understanding of Go's concurrency mechanisms. The Go standard library provides powerful tools for managing concurrent operations:
sync.WaitGroup: Efficiently wait for a collection of GoRoutines to complete.sync.Mutex: Protect shared resources by providing mutual exclusion, preventing race conditions.- Channels: Enable GoRoutines to communicate and synchronize by sending and receiving data. This is the preferred method for concurrent data sharing in Go.
Go's core philosophy for concurrent programming is "Don't communicate by sharing memory; share memory by communicating." Channels are the primary mechanism for implementing this.
This course provides a detailed exploration of Go concurrency using WaitGroup, Mutex, and Channels. We'll delve into common concurrency challenges, including:
- Race Conditions: Understanding and preventing data corruption when multiple GoRoutines access shared resources.
- Early Program Termination: Managing graceful shutdowns in concurrent applications.
To solidify your understanding, we'll tackle classic concurrency problems:
- Dining Philosophers: A timeless problem illustrating deadlock avoidance.
- Producer/Consumer: Implementing efficient data flow between producers and consumers.
- Sleeping Barber: Managing resources and synchronization in a concurrent environment.
Finally, we'll apply these principles to a practical real-world scenario: building a customer registration and subscription service. We'll leverage concurrent tasks to streamline the registration, invoicing, and onboarding process, optimizing for speed and efficiency.
Prerequisite: This course requires Docker Desktop. Udemy Business users should consult their employer before installing.
Need a web app built? Hire the team behind TutorialSearch.io
We ship fast, production-grade full-stack apps (Next.js, React, edge infra) — the same stack that powers this site.