SendTransactionServices now exit their thread on channel drop instead of by a flag

This commit is contained in:
Michael Vines
2020-09-18 09:17:04 -07:00
committed by mergify[bot]
parent 75c3690ccd
commit c4913e3c9e
5 changed files with 52 additions and 74 deletions

View File

@@ -313,14 +313,12 @@ impl JsonRpcService {
bigtable_ledger_storage,
);
let exit_send_transaction_service = Arc::new(AtomicBool::new(false));
let leader_info =
poh_recorder.map(|recorder| LeaderInfo::new(cluster_info.clone(), recorder));
let _send_transaction_service = Arc::new(SendTransactionService::new(
tpu_address,
&bank_forks,
leader_info,
&exit_send_transaction_service,
receiver,
));
@@ -369,7 +367,6 @@ impl JsonRpcService {
let server = server.unwrap();
close_handle_sender.send(server.close_handle()).unwrap();
server.wait();
exit_send_transaction_service.store(true, Ordering::Relaxed);
exit_bigtable_ledger_upload_service.store(true, Ordering::Relaxed);
})
.unwrap();