We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dd24c7b + 29b8593 commit 815b3aeCopy full SHA for 815b3ae
library/std/src/sys/unix/thread.rs
@@ -207,7 +207,9 @@ impl Thread {
207
pub fn set_name(name: &CStr) {
208
unsafe {
209
let thread_self = libc::find_thread(ptr::null_mut());
210
- libc::rename_thread(thread_self, name.as_ptr());
+ let res = libc::rename_thread(thread_self, name.as_ptr());
211
+ // We have no good way of propagating errors here, but in debug-builds let's check that this actually worked.
212
+ debug_assert_eq!(res, libc::B_OK);
213
}
214
215
0 commit comments