You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose task, and scheduler name information to debuggers #10302
Currently, when debugging my heavily concurrent Rust program all I get is blanks in the name fields. It'd be really nice if my debugger could show the name I set using the task builder API.
This sort of relates to issue #2891 but is a different view on the topic.
Calling the pthread naming functions on every context switch seems like it would do this, but it might add too much overhead to what should be a cheap context switch and it's not portable.
@thestinger I had a look as to how this could be implemented and it's actually not so easy, as there is no POSIX-ly standard way to set a thread's name. All the *nixes do this in a bit different way with the most annoying one being OS X where you only can set the name from within the thread and the function is only available since OS X 10.6. It seems Linux and BSDs are okay though.
Activity
thestinger commentedon Nov 6, 2013
Calling the
pthreadnaming functions on every context switch seems like it would do this, but it might add too much overhead to what should be a cheap context switch and it's not portable.thestinger commentedon Sep 29, 2014
This will be very easy to implement now that there are only going to be native threads. (#17325)
vojtechkral commentedon Jan 27, 2015
@thestinger I had a look as to how this could be implemented and it's actually not so easy, as there is no POSIX-ly standard way to set a thread's name. All the *nixes do this in a bit different way with the most annoying one being OS X where you only can set the name from within the thread and the function is only available since OS X 10.6. It seems Linux and BSDs are okay though.
Source: this SO thread.
Thread native name setting, fix rust-lang#10302
Thread native name setting, fix rust-lang#10302
Thread native name setting, fix rust-lang#10302
Thread native name setting, fix rust-lang#10302
Auto merge of #21678 - vojtechkral:threads-native-names, r=
Thread native name setting, fix rust-lang#10302
rollup merge of rust-lang#21678: vojtechkral/threads-native-names
Auto merge of rust-lang#10357 - nindalf:doc_markdown_relax, r=llogiq