Go in 5 Minutes, episode 15.
This screencast overviews the "Internet Cafe" problem on Trivial Concurrency Exercises for the Confused Newbie Gopher, and provides a solution.
We're finishing up the concurrency series - see #14 for what we've covered.
Screencast video: https://goin5minutes.com/screencast/episode_15_internet_cafe/
- Extended screencast: https://gum.co/gifm-x-15
- Reminder: subscribe to the newsletter at https://goin5minutes.com/subscribe/
The code in this screencast has a bug - it may exit before all of the tourists are done using their computer. The extended screencast that accompanies this one shows how to fix it.
Get the extended screencast at https://gum.co/gifm-x-15.
- This problem
- Broadcasting to many goroutines
- A new way to use
select
- Example code