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

Adding native_handle to jthread #1966

Merged
merged 2 commits into from
Jun 12, 2021

Conversation

bhardwajs
Copy link
Contributor

Similar to thread::native_handle(), this PR adds jthread::native_handle() which calls native_handle for internal thread. I don't see any unit tests for thread::native_handle() which is why I am not adding any unit tests for this code change.

Resolves #1963

@bhardwajs bhardwajs requested a review from a team as a code owner June 8, 2021 03:52
@StephanTLavavej StephanTLavavej added the bug Something isn't working label Jun 8, 2021
stl/inc/thread Outdated Show resolved Hide resolved
stl/inc/thread Outdated Show resolved Hide resolved
@CaseyCarter CaseyCarter changed the title Adding native_handle to jthread() Adding native_handle to jthread Jun 8, 2021
@StephanTLavavej
Copy link
Member

Note (no change requested): reordering member functions can affect ABI, but that's specific to new declarations of virtual functions. These are non-virtual so there's no ABI impact.

@StephanTLavavej StephanTLavavej removed their assignment Jun 10, 2021
@bhardwajs
Copy link
Contributor Author

Note (no change requested): reordering member functions can affect ABI, but that's specific to new declarations of virtual functions. These are non-virtual so there's no ABI impact.

TIL. Thanks STL!

@bhardwajs bhardwajs closed this Jun 10, 2021
@bhardwajs bhardwajs reopened this Jun 10, 2021
@bhardwajs
Copy link
Contributor Author

@StephanTLavavej @CaseyCarter - I accidently closed the PR when I just wanted to leave a comment. Sorry for messing up with the Code Review workflow!

@StephanTLavavej StephanTLavavej self-assigned this Jun 11, 2021
@StephanTLavavej StephanTLavavej merged commit ae041ae into microsoft:main Jun 12, 2021
@StephanTLavavej
Copy link
Member

Thanks for fixing this high-priority customer-reported bug! 🪲 😺 🎉

@bhardwajs bhardwajs deleted the sumitb/gh_1963 branch June 12, 2021 05:16
hidez8891 added a commit to hidez8891/cpp-debugio that referenced this pull request Sep 20, 2021
VS2019 では std::jthread::native_handle() が実装されていない。
microsoft/STL#1966
そのため、std::threadで代替する。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<thread>: jthread should provide native_handle()
3 participants