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 0570a96Copy full SHA for 0570a96
src/lib.rs
@@ -708,6 +708,11 @@ impl<K: KVStore + Sync + Send + 'static> Node<K> {
708
Ok(())
709
}
710
711
+ /// Checks if [`Node`] runtime is available.
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