pass exit by ref (#25120)
This commit is contained in:
parent
a8930ee14b
commit
41d34d45e0
|
@ -24,8 +24,8 @@ pub struct PohTimingReportService {
|
|||
}
|
||||
|
||||
impl PohTimingReportService {
|
||||
pub fn new(receiver: PohTimingReceiver, exit: Arc<AtomicBool>) -> Self {
|
||||
let exit_signal = exit;
|
||||
pub fn new(receiver: PohTimingReceiver, exit: &Arc<AtomicBool>) -> Self {
|
||||
let exit_signal = exit.clone();
|
||||
let mut poh_timing_reporter = PohTimingReporter::default();
|
||||
let t_poh_timing = Builder::new()
|
||||
.name("poh_timing_report".to_string())
|
||||
|
@ -65,7 +65,7 @@ mod test {
|
|||
let exit = Arc::new(AtomicBool::new(false));
|
||||
// Create the service
|
||||
let poh_timing_report_service =
|
||||
PohTimingReportService::new(poh_timing_point_receiver, exit.clone());
|
||||
PohTimingReportService::new(poh_timing_point_receiver, &exit);
|
||||
|
||||
// Send SlotPohTimingPoint
|
||||
let _ = poh_timing_point_sender.send(SlotPohTimingInfo::new_slot_start_poh_time_point(
|
||||
|
|
|
@ -501,7 +501,7 @@ impl Validator {
|
|||
|
||||
let (poh_timing_point_sender, poh_timing_point_receiver) = unbounded();
|
||||
let poh_timing_report_service =
|
||||
PohTimingReportService::new(poh_timing_point_receiver, exit.clone());
|
||||
PohTimingReportService::new(poh_timing_point_receiver, &exit);
|
||||
|
||||
let (
|
||||
genesis_config,
|
||||
|
|
Loading…
Reference in New Issue