Closed ranaanoop closed 1 year ago
There is a clear "first" function that is invoked in a thread, so I personally think "initial function" is a fine name, and "associated function" is strictly worse.
I see, so as long as that "clear first function" gets defined(which currently is not), it's fine. Though I would prefer the term "associated function" over terms like "initial function" or "first function". But again, that is only my opinion/preference.
On Fri, 2 Jun 2023, 21:59 Jens Maurer, @.***> wrote:
There is a clear "first" function that is invoked in a thread, so I personally think "initial function" is a fine name, and "associated function" is strictly worse.
— Reply to this email directly, view it on GitHub https://github.com/cplusplus/CWG/issues/333#issuecomment-1574012095, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWMRJMDXXT7BZEEO3FS46FTXJIIFZANCNFSM6AAAAAAYWOTR74 . You are receiving this because you authored the thread.Message ID: @.***>
My preferences align with Jens'. As a thread continues execution it will acquire additional "associated" functions, but there will only ever be one "initial" function; the one passed to the std::thread
constructor.
the one passed to the
std::thread
constructor
There may be arguably no such a function, since we can pass a pointer to data member to the constructor.
There may be arguably no such a function, since we can pass a pointer to data member to the constructor.
In either case, per [thread.thread.constr]p5, std::invoke()
is arguably the initial function.
There seem to be no additional issues left beyond those discussed in #241, thus closing this item.
Full name of submitter (unless configured in github; will be published with the issue): Anoop Rana
Reference (section label): [intro.defs]
Link to reflector thread (if any): https://github.com/cplusplus/CWG/issues/241
Issue description:
Issue noted that the term _initialfunction has not been defined while it is used at various places in the standard. Further, I think the term should be changed/renamed to be called associated function. This term(i.e associated function) seems more appropriate given that there are term like associated namespaces already in use in the standard.
Suggested resolution:
Change the term "initial function" to "associated function" and add the corresponding definition to [intro.defs].