committed by
Sergio Benitez
parent
6b9fbf212a
commit
d0d0e78208
@@ -457,11 +457,16 @@ 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 main = move || {
|
||||
if let Some(name) = their_thread.cname() {
|
||||
imp::Thread::set_name(name);
|
||||
}
|
||||
|
||||
crate::io::set_print(stdout);
|
||||
crate::io::set_panic(stderr);
|
||||
|
||||
// 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
|
||||
// are properly set and protected from each other.
|
||||
|
||||
Reference in New Issue
Block a user