Skip to content

Instantly share code, notes, and snippets.

@Anshuman-02905
Created September 14, 2025 07:25
Show Gist options
  • Select an option

  • Save Anshuman-02905/22b6f43f893d7cdd8d5f51383aed3ffc to your computer and use it in GitHub Desktop.

Select an option

Save Anshuman-02905/22b6f43f893d7cdd8d5f51383aed3ffc to your computer and use it in GitHub Desktop.
Problem sync Tool Used Key Learning
Ping Pong sync.Mutex Protect shared state
Producer–Consumer sync.Mutex, sync.Cond Wait/notify on conditions
Sleeping Barber sync.WaitGroup, Channels Use channels as queues
Dining Philosophers sync.Mutex, sync.WaitGroup Prevent deadlocks
Worker Pool (Fan-in/out) sync.WaitGroup Aggregate worker results
Heartbeat–Ward Channels, Timers Failure detection via signals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment