C++ Multi-Threaded
Audio Playback
Synchronization
It’s not a controversial statement to say that multi-threaded programming can be difficult. Take everything that can go wrong with a single-threaded program, remove the guarantee of sequential execution of events, and you have a recipe for long debugging sessions. Thankfully there exist some standard synchronization mechanisms that can be found in most languages, like mutexs. These work for basic synchronization, but a language like C++ offers a rich set of tools that go so far beyond what can be offered by a simple mutex. This program aimed to explore the usage of these advanced synchronization mechanisms, such as futures and promises, condition variables, and asyncs. Using these and 25 different threads, it coordinates the asynchronous loading and playback of the Jetsons theme song. Loving referred to as “Coordination Hell,” you can find a more thorough description of the project by clicking the link below.