[basic.start.dynamic] says "of a thread", what thread?
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 221
- Forks
- 813
- Avg merge
- 16h 4m
- Merged PRs (30d)
- 36
Description
The wording added in CWG Motion 10, P0250R3 adds the phrase "whether the dynamic initialization of a non-local non-inline variable with thread storage duration is sequenced before the first statement of the initial function of a thread or is deferred", but "of a thread" isn't clear - what thread?
Comments from Richard:
I actually think this is "of its thread", since we're talking about a specific thread-local variable, whose associated thread is the one we're talking about.
... but the problem is that this requires us to distinguish between the abstract notion of the variable, and the per-thread versions of it, and we don't seem to have good terminology for that distinction. [basic.stc.thread] seems to imply that there is only one "variable" but each thread has its own object or reference, which seems a bit wrong to me but matches the usage here.
In summary, I think this is more "of each thread" than "of any thread" but even that's not quite right. Still, I don't want to get into the subtleties of improving this editorially at this late stage and would rather go ahead with the (less precise than I'd like but probably hard to misinterpret) wording from the paper. Please feel free to open an issue though, and we can look into this post-C++17.
Also added in P0250R3 is wording which says: "the entity for thread t". What entity???
Comments from Richard:
This intends to refer to the thing described in [basic.stc.thread]. But we’re inconsistent in whether we treat a thread_local variable as one entity or multiple.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the wording in [basic.start.dynamic] from P0250R3 and compare it with the terminology in [basic.stc.thread]. Determine how the standard should refer to the thread-local entity and its associated thread, then update the affected wording and check for consistent usage across the surrounding clauses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100