Go for Infrastructure
Select fairness
A Go select chooses one ready communication; source order is not priority.
What you will be able to do
- Explain the idea using the worked example
- Identify a failure and choose 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
- GMP schedulerBeginner · 4 min
Go schedules goroutines on operating system threads using runtime execution resources.
- ChannelsBeginner · 4 min
A typed channel transfers values between goroutines and can synchronize a handoff.
- 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.
- Atomic operationsBeginner · 4 min
sync/atomic performs a read-modify-write on one value as a single indivisible operation.