Lernpfad

Nebenläufigkeit in Go

Goroutinen, Channels, select, Mutex, Worker Pools und context.

6 Lektionen · 6 Challenges

  1. Lektion 1 Challenge Goroutines and WaitGroup Start lightweight threads with go and wait for them with sync.WaitGroup.
  2. Lektion 1 Challenge Channels Send values between goroutines with channels, buffered and unbuffered.
  3. Lektion 1 Challenge Select and Timeouts Wait on several channels at once and stop waiting after a timeout.
  4. Lektion 1 Challenge Mutex: Protecting Shared Data Let several goroutines change one value safely with sync.Mutex.
  5. Lektion 1 Challenge Worker Pool Share a queue of jobs between a fixed number of goroutines.
  6. Lektion 1 Challenge Context: Cancellation and Deadlines Stop work that takes too long or is no longer needed with context.