Comment

Comment by JoshTriplett

> When both conditions are met, the loop body is replaced with a call to std::this_thread::yield().

Insert screaming here.

An infinite loop, with no library calls whatsoever, gets a system call inserted. That's a horrible surprise waiting to happen.

The entire concept of the "forward progress guarantee" is broken. An infinite loop should compile to an infinite loop. Nothing more, nothing less.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton