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.rs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libstd/thread.rs b/src/libstd/thread.rs
index a7b3ee996a3..cfdb5c2ec26 100644
--- a/src/libstd/thread.rs
+++ b/src/libstd/thread.rs
@@ -232,13 +232,10 @@ impl Builder {
             let my_stack_top = addr as uint;
             let my_stack_bottom = my_stack_top - stack_size + 1024;
             unsafe {
-                stack::record_os_managed_stack_bounds(my_stack_bottom, my_stack_top);
+                stack::record_os_managed_stack_bounds(my_stack_bottom,
+                                                      my_stack_top);
+                thread_info::set(imp::guard::current(), their_thread);
             }
-            thread_info::set(
-                (my_stack_bottom, my_stack_top),
-                unsafe { imp::guard::current() },
-                their_thread
-            );
 
             let mut output = None;
             let f: Thunk<(), T> = if stdout.is_some() || stderr.is_some() {