about summary refs log tree commit diff
path: root/src/libstd/thread.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd/thread.rs')
-rw-r--r--src/libstd/thread.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs
index eb967c9f4e3..dda97bec925 100644
--- a/src/libstd/thread.rs
+++ b/src/libstd/thread.rs
@@ -280,6 +280,10 @@ impl Builder {
             unsafe {
                 stack::record_os_managed_stack_bounds(my_stack_bottom, my_stack_top);
             }
+            match their_thread.name() {
+                Some(name) => unsafe { imp::set_name(name.as_slice()); },
+                None => {}
+            }
             thread_info::set(
                 (my_stack_bottom, my_stack_top),
                 unsafe { imp::guard::current() },