February 2019
Intermediate to advanced
592 pages
20h 37m
English
This chapter covers
In the last chapter, we looked at various ways of protecting data that’s shared between threads. But sometimes you don’t just need to protect the data, you also need to synchronize actions on separate threads. One thread might need to wait for another thread to complete a task before the first thread can complete its own, for example. In general, it’s common to want a thread to wait for a specific event to happen or a condition to be true. Although it would be possible to do this by periodically checking a “task complete” flag or something ...