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

Implement named threads on Windows (v2) #44374

Merged
merged 2 commits into from
Sep 15, 2017
Merged

Implement named threads on Windows (v2) #44374

merged 2 commits into from
Sep 15, 2017

Conversation

jsheard
Copy link
Contributor

@jsheard jsheard commented Sep 6, 2017

https://msdn.microsoft.com/en-us/library/windows/desktop/mt774976(v=vs.85).aspx

Windows 10 version 1607 finally added a sensible API for naming threads, so we can now implement named threads without having to use MSVC compiler extensions like before. VS2017s debugger and the WPA profiler already use this API where available, but other tools may need some time to catch up.

thread

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @aturon (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@alexcrichton
Copy link
Member

@bors: r+

Nice!

@bors
Copy link
Contributor

bors commented Sep 6, 2017

📌 Commit 8e80cee has been approved by alexcrichton

@alexcrichton alexcrichton added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Sep 6, 2017
// The names in MSVC debugger are obtained using a "magic" exception,
// which requires a use of MS C++ extensions.
// See https://msdn.microsoft.com/en-us/library/xcb2z8hs.aspx
pub fn set_name(name: &CStr) {
Copy link
Member

@retep998 retep998 Sep 7, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems kinda silly that this function still takes CStr.

@bors
Copy link
Contributor

bors commented Sep 11, 2017

⌛ Testing commit 8e80cee with merge d146ac2bdd1ffa36b20b7563bb40f3f6a5354c92...

@frewsxcv
Copy link
Member

prioritizing rollup @bors retry

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Sep 13, 2017
Implement named threads on Windows (v2)

https://msdn.microsoft.com/en-us/library/windows/desktop/mt774976(v=vs.85).aspx

Windows 10 version 1607 finally added a sensible API for naming threads, so we can now implement named threads without having to use MSVC compiler extensions like before. VS2017s debugger and the WPA profiler already use this API where available, but other tools may need some time to catch up.

![thread](https://user-images.githubusercontent.com/3153547/30133438-c92a3cda-934b-11e7-9668-915d53e8d860.png)
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Sep 14, 2017
Implement named threads on Windows (v2)

https://msdn.microsoft.com/en-us/library/windows/desktop/mt774976(v=vs.85).aspx

Windows 10 version 1607 finally added a sensible API for naming threads, so we can now implement named threads without having to use MSVC compiler extensions like before. VS2017s debugger and the WPA profiler already use this API where available, but other tools may need some time to catch up.

![thread](https://user-images.githubusercontent.com/3153547/30133438-c92a3cda-934b-11e7-9668-915d53e8d860.png)
@bors
Copy link
Contributor

bors commented Sep 14, 2017

☔ The latest upstream changes (presumably #43972) made this pull request unmergeable. Please resolve the merge conflicts.

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Sep 14, 2017

📌 Commit 597ac36 has been approved by alexcrichton

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Sep 15, 2017
Implement named threads on Windows (v2)

https://msdn.microsoft.com/en-us/library/windows/desktop/mt774976(v=vs.85).aspx

Windows 10 version 1607 finally added a sensible API for naming threads, so we can now implement named threads without having to use MSVC compiler extensions like before. VS2017s debugger and the WPA profiler already use this API where available, but other tools may need some time to catch up.

![thread](https://user-images.githubusercontent.com/3153547/30133438-c92a3cda-934b-11e7-9668-915d53e8d860.png)
bors added a commit that referenced this pull request Sep 15, 2017
@bors bors merged commit 597ac36 into rust-lang:master Sep 15, 2017
@jsheard jsheard deleted the threadname branch September 15, 2017 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants