Skip to content

P3072 R2 Hassle-free thread attributes #1733

Closed
@wg21bot

Description

@wg21bot
Collaborator

P3072R0 Hassle-free thread attributes (Zhihao Yuan)

Activity

added this to the 2024-telecon milestone on Dec 19, 2023
inbal2l

inbal2l commented on Dec 19, 2023

@inbal2l
Member

Related to P2019 (#817), P3022 (#1683)

added
B3 - additionBucket 3 as described by P0592: material that is not mentioned in P0592
C++26Targeted at C++26
on Dec 19, 2023
wg21bot

wg21bot commented on Feb 16, 2024

@wg21bot
CollaboratorAuthor

P3072R1 Hassle-free thread attributes (Zhihao Yuan)

changed the title [-]P3072 R0 Hassle-free thread attributes[/-] [+]P3072 R1 Hassle-free thread attributes[/+] on Feb 16, 2024
added
scheduled-for-library-evolutionThis paper has been scheduled for one of the groups: LEWG, LEWG Incubator, or a Mailing List review
on Feb 16, 2024
ednolan

ednolan commented on Feb 20, 2024

@ednolan

A feedback round was started on the mailing list on Feb 19, 2024.
https://lists.isocpp.org/lib-ext/2024/02/26689.php

Summary:

  • Reviewers discussed the ABI stability and extensibility of the proposed std::thread::attributes class.
    • A reviewer expressed strong opposition to standardizing a thread attributes facility that did not provide a path forward for standardizing additional attributes in the future.
    • The author responded that new attributes could be standardized by adding a new class which would be extended to contain both the original and the new attributes.
    • A reviewer opined that handling future attribute proposals by adding a new class with a larger set of attributes was proposed in the context of P3022 and rejected by LEWG.
    • The author responded that while P3022 was rejected, the question of adding new classes was not specifically polled, and the committee members that rejected P3022 may not have objected to that aspect.
    • A reviewer disputed that P3022 involved adding new classes, since future attributes could be standardized by adding new setters to the existing attributes class.
  • Reviewers discussed how the proposal handles vendored thread attributes.
    • A reviewer criticized the fact that, since the proposal doesn't provide a way to pass multiple sets of attributes, vendored thread attributes need to be a superset of the standard attributes.
    • The author responded that passing both standard and vendored thread attributes classes leaves open the possibility that the implementation might ignore the non-vendored thread attributes.
  • Reviewers discussed the use of an aggregate class and the practice of using designated initializers.
    • A reviewer claimed that designated initializers are unfamiliar to C++ developers because they weren't standardized until C++20.
    • The author replied that, even before 2016, C++ developers would have been likely to have encountered them, either in C code, or in C++ code that implemented designated initializers as a compiler extension.
    • A reviewer opined that designated initializers are hard to use because the initializers must be specified in a specific, arbitrary order.
    • The author replied that a good quality compiler will explain how to fix the problem in its diagnostic.
    • A reviewer predicted that users were likely to initialize the thread attributes aggregate without using designated initializers, based on their greater familiarity with that method, and that leaving them out would reduce clarity.
    • The author replied that doing so is an intended use case.

The paper is scheduled for Tokyo.

11 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    B3 - additionBucket 3 as described by P0592: material that is not mentioned in P0592C++26Targeted at C++26ISShip vehicle: ISsize - mediumpaper size estimate

    Type

    No type

    Projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ednolan@ben-craig@cor3ntin@inbal2l@wg21bot

        Issue actions

          P3072 R2 Hassle-free thread attributes · Issue #1733 · cplusplus/papers