parent
6b9fbf212a
commit
d0d0e78208
14 changed files with 177 additions and 12 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue