Skip to content

Commit

Permalink
Ignore errors when joining background threads for EAH tests (solana-l…
Browse files Browse the repository at this point in the history
  • Loading branch information
brooksprumo authored Oct 6, 2022
1 parent 30b0a13 commit 2d93678
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions core/tests/epoch_accounts_hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,11 @@ impl Drop for BackgroundServices {
info!("Stopping background services...");
self.exit.store(true, Ordering::Relaxed);

unsafe { ManuallyDrop::take(&mut self.accounts_background_service) }
.join()
.expect("stop ABS");

unsafe { ManuallyDrop::take(&mut self.accounts_hash_verifier) }
.join()
.expect("stop AHV");

unsafe { ManuallyDrop::take(&mut self.snapshot_packager_service) }
.join()
.expect("stop SPS");
// Join the background threads, and ignore any errors.
// SAFETY: We do not use any of the `ManuallyDrop` fields again, so `.take()` is OK here.
_ = unsafe { ManuallyDrop::take(&mut self.accounts_background_service) }.join();
_ = unsafe { ManuallyDrop::take(&mut self.accounts_hash_verifier) }.join();
_ = unsafe { ManuallyDrop::take(&mut self.snapshot_packager_service) }.join();

info!("Stopping background services... DONE");
}
Expand Down

0 comments on commit 2d93678

Please sign in to comment.