Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by bitbasher

16 hours ago

If an infinite loop can be both:

1. An infinite busy loop.

2. A thread yield/sleep.

It is by definition undefined behavior. You don't know what you're going to get!

2 comments

bitbasher

Reply

mwkaufma  14 hours ago

If it's one of those two it's not fully undefined behavior it's just implementation defined. UB can do anything.

cppcppcpp  16 hours ago

You know what you’re getting, the code is right there!

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities