diff options
| author | Vojtech Kral <vojtech@kral.hk> | 2015-02-04 02:26:00 +0100 |
|---|---|---|
| committer | Vojtech Kral <vojtech@kral.hk> | 2015-02-08 17:49:20 +0100 |
| commit | dca49e06b18c63185a60e73f4ccde77ed541c079 (patch) | |
| tree | 971cb667997ccfc766911130ba49c6806243dfc1 /src/libstd/thread.rs | |
| parent | bfdcd34e82fca5186f0565c28c5c9b6a9f9b6c76 (diff) | |
| download | rust-dca49e06b18c63185a60e73f4ccde77ed541c079.tar.gz rust-dca49e06b18c63185a60e73f4ccde77ed541c079.zip | |
Move native thread name setting from thread_info to Thread, fixes #21911
Diffstat (limited to 'src/libstd/thread.rs')
| -rw-r--r-- | src/libstd/thread.rs | 4 |
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() }, |
