Skip to content

Commit 7a68011

Browse files
committed
parallel compiler stuffs
1 parent 4339816 commit 7a68011

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

compiler/rustc_session/src/progress.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{
66
};
77

88
use indicatif::{MultiProgress, ProgressBar, ProgressStyle};
9-
use rustc_data_structures::fx::FxHashMap;
9+
use rustc_data_structures::{fx::FxHashMap, sync::IntoDynSyncSend};
1010

1111
use crate::Session;
1212

@@ -15,7 +15,7 @@ thread_local! {
1515
}
1616

1717
pub struct ProgressBars {
18-
sender: Sender<Msg>,
18+
sender: IntoDynSyncSend<Sender<Msg>>,
1919
}
2020

2121
enum Msg {
@@ -70,8 +70,10 @@ impl Session {
7070
}
7171
}
7272
});
73-
ProgressBars { sender }
73+
ProgressBars { sender: IntoDynSyncSend(sender) }
7474
}
75+
76+
/// Append a new spinner to the current stack
7577
pub fn push_spinner(&self, bars: &ProgressBars, name: &'static str) -> impl Sized {
7678
let thread = std::thread::current().id();
7779
bars.sender.send(Msg::Push { thread, name }).unwrap();
@@ -81,6 +83,6 @@ impl Session {
8183
self.0.send(Msg::Pop { thread: self.1 }).unwrap();
8284
}
8385
}
84-
Spinner(bars.sender.clone(), thread)
86+
Spinner(bars.sender.0.clone(), thread)
8587
}
8688
}

0 commit comments

Comments
 (0)