Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this_thread::get_id() is not related to psychoanalysis #5833

Closed
jwakely opened this issue Sep 14, 2022 · 3 comments · Fixed by #5848
Closed

this_thread::get_id() is not related to psychoanalysis #5833

jwakely opened this issue Sep 14, 2022 · 3 comments · Fixed by #5848
Assignees

Comments

@jwakely
Copy link
Member

jwakely commented Sep 14, 2022

No other thread of execution has this id and this thread of execution always has this id.

Shouldn't "id" be "id value", or "identity", or something?

@jensmaurer
Copy link
Member

The preceding text has "uniquely identifies the current thread of execution", so the first part "no other thread" is redundant anyway.

@tkoeppe
Copy link
Contributor

tkoeppe commented Sep 17, 2022

Is there any concern about whether past or future threads might reuse IDs? Did the original "no other thread" wording imply anyhing stronger than just "uniquely identifies"?

@jensmaurer
Copy link
Member

jensmaurer commented Sep 17, 2022

In practice, we can't prevent thread-id overflow anyway.

And it was and continues to be uncertain whether "uniquely identifies" and "no other thread" refers to the entire history of the program, or just to the current instant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants