Percorso di apprendimento

Concorrenza in Go

Goroutine, canali, select, Mutex, worker pool e context.

6 lezioni · 6 sfide

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