From dca49e06b18c63185a60e73f4ccde77ed541c079 Mon Sep 17 00:00:00 2001 From: Vojtech Kral Date: Wed, 4 Feb 2015 02:26:00 +0100 Subject: Move native thread name setting from thread_info to Thread, fixes #21911 --- src/libstd/thread.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/libstd/thread.rs') 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() }, -- cgit 1.4.1-3-g733a5