Go for Infrastructure
Channels
A typed channel transfers values between goroutines and can synchronize a handoff.
What you will be able to do
- Explain the idea using the worked example
- Identify the failure and select a next check
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A command to try yourself
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Go for Infrastructure
- Goroutine schedulingBeginner · 4 min
Go goroutines are lightweight user-space tasks scheduled onto OS threads by the Go runtime. They are not always in one-to-one correspondence with threads. Channels…
- GMP schedulerBeginner · 4 min
Go schedules goroutines on operating system threads using runtime execution resources.
- Select fairnessBeginner · 4 min
A Go select chooses one ready communication; source order is not priority.
- Context cancellationBeginner · 4 min
A Go context communicates cancellation and deadlines to code that observes it.
- WaitGroupsBeginner · 4 min
A WaitGroup lets a caller wait for a set of tasks to finish.
- Mutex and RWMutexBeginner · 4 min
A mutex coordinates access to shared state; an RWMutex permits multiple readers or one writer.