Clean up exit flag handing across TVU

This commit is contained in:
Michael Vines
2019-03-04 20:50:02 -08:00
committed by Grimes
parent 2a849ae268
commit 6ab6e6cb9b
21 changed files with 97 additions and 138 deletions

View File

@@ -264,6 +264,7 @@ impl Fullnode {
// Used for notifying many nodes in parallel to exit
pub fn exit(&self) {
self.exit.store(true, Ordering::Relaxed);
// Need to force the poh_recorder to drop the WorkingBank,
// which contains the channel to BroadcastStage. This should be
// sufficient as long as no other rotations are happening that
@@ -272,7 +273,6 @@ impl Fullnode {
// in motion because exit()/close() are only called by the run() loop
// which is the sole initiator of rotations.
self.poh_recorder.lock().unwrap().clear_bank();
self.poh_service.exit();
}
pub fn close(self) -> Result<()> {