We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
is_running
Node
1 parent db1b7dc commit 0212d21Copy full SHA for 0212d21
src/lib.rs
@@ -708,6 +708,11 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
708
Ok(())
709
}
710
711
+ /// Returns whether the [`Node`] is running.
712
+ pub fn is_running(&self) -> bool {
713
+ self.runtime.read().unwrap().is_some()
714
+ }
715
+
716
/// Disconnects all peers, stops all running background tasks, and shuts down [`Node`].
717
///
718
/// After this returns most API methods will return [`Error::NotRunning`].
0 commit comments