From 1a8c0391c52e361160ca09c8aa780df76aa78759 Mon Sep 17 00:00:00 2001 From: Artem Vorotnikov Date: Tue, 11 Feb 2020 11:41:23 +0300 Subject: [PATCH] weak_counts has been stabilized (#11476) --- parity/run.rs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/parity/run.rs b/parity/run.rs index 3ab5a67b2..5e1d43d6e 100644 --- a/parity/run.rs +++ b/parity/run.rs @@ -900,9 +900,7 @@ impl RunningClient { trace!(target: "shutdown", "Informant dropped"); drop(client); trace!(target: "shutdown", "Client dropped"); - // This may help when debugging ref cycles. Requires nightly-only `#![feature(weak_counts)]` - // trace!(target: "shutdown", "Waiting for refs to Client to shutdown, strong_count={:?}, weak_count={:?}", weak_client.strong_count(), weak_client.weak_count()); - trace!(target: "shutdown", "Waiting for refs to Client to shutdown"); + trace!(target: "shutdown", "Waiting for refs to Client to shutdown, strong_count={:?}, weak_count={:?}", weak_client.strong_count(), weak_client.weak_count()); wait_for_drop(weak_client); } } @@ -960,11 +958,7 @@ fn wait_for_drop(w: Weak) { thread::sleep(SLEEP_DURATION); - // When debugging shutdown issues on a nightly build it can help to enable this with the - // `#![feature(weak_counts)]` added to lib.rs (TODO: enable when - // https://github.com/rust-lang/rust/issues/57977 is stable) - // trace!(target: "shutdown", "Waiting for client to drop, strong_count={:?}, weak_count={:?}", w.strong_count(), w.weak_count()); - trace!(target: "shutdown", "Waiting for client to drop"); + trace!(target: "shutdown", "Waiting for client to drop, strong_count={:?}, weak_count={:?}", w.strong_count(), w.weak_count()); } warn!("Shutdown timeout reached, exiting uncleanly.");