diff options
| author | bors <bors@rust-lang.org> | 2015-02-10 19:52:04 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-02-10 19:52:04 +0000 |
| commit | bc87efef2cceaec99d30e809cac2b8d22b9e25fc (patch) | |
| tree | 1f59e50bc58a426615cc15594cade8b69f24bdbf /src/libstd/thread.rs | |
| parent | 88d8ba5ab3b1d22288b021708c3d87464e43b880 (diff) | |
| parent | 3e10785e21b731d536cf9ad9b911e8261862bde7 (diff) | |
| download | rust-bc87efef2cceaec99d30e809cac2b8d22b9e25fc.tar.gz rust-bc87efef2cceaec99d30e809cac2b8d22b9e25fc.zip | |
Auto merge of #22153 - alexcrichton:rollup, r=alexcrichton
Diffstat (limited to 'src/libstd/thread.rs')
| -rw-r--r-- | src/libstd/thread.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs index eb967c9f4e3..cc9d7492441 100644 --- a/src/libstd/thread.rs +++ b/src/libstd/thread.rs @@ -156,6 +156,7 @@ use ops::{Drop, FnOnce}; use option::Option::{self, Some, None}; use result::Result::{Err, Ok}; use sync::{Mutex, Condvar, Arc}; +use str::Str; use string::String; use rt::{self, unwind}; use old_io::{Writer, stdio}; @@ -280,6 +281,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() }, |
