set native thread name for the debugger · Issue #13022 · rust-lang/rust (original) (raw)

On Linux, this can be done with pthread_setname_np. The maximum length for the name is 16 (really 15, since it ends with a zero byte) so it needs to be truncated. The threads will then show their given name in info threads. This makes debugging so much easier.