Skip to content

Conversation

kuzkry
Copy link
Contributor

@kuzkry kuzkry commented Sep 20, 2019

Bjarne mentioned jthread in his talk: https://youtu.be/u_ij0YNkFUs?t=3165
I believe gsl::joining_thread should reflect that.

@hsutter
Copy link
Contributor

hsutter commented Oct 10, 2019

Editors' call: gsl::joining_thread will be superseded by C++20 std::jthread. For C++17, people should use gsl::joining_thread and we won't rename it now to avoid disturbing existing users since it's going away anyway and they will eventually need to change to std::jthread. If you have a C++20 compiler, use std::jthread directly.

@hsutter hsutter self-assigned this Oct 10, 2019
@hsutter hsutter closed this Oct 10, 2019
@kuzkry
Copy link
Contributor Author

kuzkry commented Oct 11, 2019

Thanks @hsutter, I agree with that.
But then probably as soon as C++20 is released, examples in the guidelines should be updated to use std::jthread instead of gsl::joining_thread, am I right? Similarly like with smart pointers, there are gsl counterparts of std::unique_ptr and std::shared_ptr but the guidelines prefer the ones from std.

@kuzkry kuzkry deleted the jthread branch January 31, 2020 06:29
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 this pull request may close these issues.

2 participants