This keeps the function consistent with sleep_until() and sleep_for()
which both can be interrupted.
This is relevant to allow an update via a "signal" without an "interval"
in a custom module.
The changes in GCC 11.x made `std::condition_variable` implementation
internals `noexcept`. `noexcept` is known to interact particularly bad
with `pthread_cancel`, i.e. `__cxxabiv1::__force_unwind` passing through
the `noexcept` call stack frame causes a `std::terminate` call and
immediate termination of the program
Digging through the GCC ML archives[1] lead me to the idea of patching
this with a few pthread_setcancelstate's. As bad as the solution is, it
seems to be the best we can do within C++17 limits and without major
rework.
[1]: https://gcc.gnu.org/legacy-ml/gcc/2017-08/msg00156.html