A shared_mutex protects a shared resource when readers may run together but writers require exclusive access. A unique_lock blocks every other reader and writer; a shared_lock permits multiple readers but excludes writers. section 16.2.2
Technicians and loggers
Several technician threads set a shared meter, while logger threads read it. A unique lock prevents logging during an update; shared locks let multiple loggers read together. The program creates and joins both thread groups. section 16.2.2
Figure 16.6 Three technicians simultaneously attempt to set the meter’s value; meanwhile, three loggers attempt to read and log the meter’s current setting. Therefore, the meter is the shared resource. Only one technician should be setting the meter at a time, and no logger should read the meter while a technician is setting it. However, unless a technician is setting the meter, multiple loggers can be reading it at the same time.
The meter diagram makes the exclusivity rule concrete: one technician writes, or multiple loggers read, but never both simultaneously. section 16.2.2

