Audit the code for calls to wait_for or wait_until that do not protect against spurious wakeups
The first overload of wait_until and wait_for do not protect against spurious wakeups. The user needs to wrap them in a while loop.
I have seen multiple example of wrong usage in switcher and shmdata's code and just a global search reveals there are more.
We should replace the calls to use the second overload which takes a lambda and protects against spurious wakeups.
https://en.cppreference.com/w/cpp/thread/condition_variable/wait_for