Parcours d'apprentissage

Concurrence en Go

Goroutines, channels, select, Mutex, worker pools et context.

6 leçons · 6 défis

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