Annex F (informative) Core undefined behavior [ub]

F.2 [basic]: Basics [ub.basic]

F.2.20[ub:intro.progress.stops]
Specified in: [intro.progress]

The behavior is undefined if a thread of execution that has not terminated stops making execution steps.
[Example 1: bool stop() { return false; } void busy_wait_thread() { while (!stop()); // undefined behavior, thread makes no progress but the loop } // is not trivial because stop() is not a constant expression int main() { std::thread t(busy_wait_thread); t.join(); } — end example]