Title
Note about infinite loops and execution steps
Status
review
Section
6.9.2.3 [intro.progress]
Submitter
Simon Cooksey

Created on 2024-08-12.00:00:00 last changed yesterday

Messages

Date: 2024-11-19.12:36:26

CWG 2024-11-19

The definition of "execution step" in 6.9.2.3 [intro.progress] paragraph 3 does not include the invocation of std::this_thread::yield. However, trivial infinite loops do nothing but yield, and are not undefined behavior. Therefore, the note is believed to be factually wrong. CWG seeks advice from SG1 for resolving the inconsistency, via paper issue #2139.

Date: 2024-09-25.17:32:08

Proposed resolution (approved by CWG 2024-09-13):

Remove 6.9.2.3 [intro.progress] paragraph 5:

[Note 4: Because of this and the preceding requirement regarding what threads of execution have to perform eventually, it follows that no thread of execution can execute forever without an execution step occurring. —end note]
Date: 2024-03-15.00:00:00

Given that certain infinite loops are no longer undefined behavior (see P2809R3 (Trivial infinite loops are not Undefined Behavior), adopted in March 2024), the note in 6.9.2.3 [intro.progress] paragraph 5 claiming there are no executions without eventual execution steps should be struck.

History
Date User Action Args
2024-11-19 12:36:26adminsetmessages: + msg7904
2024-11-19 12:36:26adminsetstatus: tentatively ready -> review
2024-09-25 17:32:08adminsetmessages: + msg7819
2024-09-25 17:32:08adminsetstatus: open -> tentatively ready
2024-08-12 00:00:00admincreate