Skip to content

Paces and Mutex

The Paces are accessed from multiple threads and thus need a Mutex, however how exactly should this be done?

Currently, each Pace has it's Mutex that is locked whenever an operation is executed on the Pace. However, I guess, track_start and track_end should behave like a Mutex themselves conceptually. I.e. Only the thread that started the tracking should be able to end it but others should be able to read at any time. (At least I convinced myself that this should be the case, but writing this I'm not sure anymore.)