diff options
Diffstat (limited to 'library/std/src/thread/mod.rs')
| -rw-r--r-- | library/std/src/thread/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs index fefaa77a2a1..5d65f960fcd 100644 --- a/library/std/src/thread/mod.rs +++ b/library/std/src/thread/mod.rs @@ -456,15 +456,15 @@ impl Builder { let my_packet: Arc<UnsafeCell<Option<Result<T>>>> = Arc::new(UnsafeCell::new(None)); let their_packet = my_packet.clone(); - let (stdout, stderr) = crate::io::clone_io(); + let output_capture = crate::io::set_output_capture(None); + crate::io::set_output_capture(output_capture.clone()); let main = move || { if let Some(name) = their_thread.cname() { imp::Thread::set_name(name); } - crate::io::set_print(stdout); - crate::io::set_panic(stderr); + crate::io::set_output_capture(output_capture); // SAFETY: the stack guard passed is the one for the current thread. // This means the current thread's stack and the new thread's stack |
