+ /// Join `BackgroundProcessor`'s thread, returning any error that occurred while persisting
+ /// [`ChannelManager`].
+ ///
+ /// # Panics
+ ///
+ /// This function panics if the background thread has panicked such as while persisting or
+ /// handling events.
+ ///
+ /// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
+ pub fn join(mut self) -> Result<(), std::io::Error> {
+ assert!(self.thread_handle.is_some());
+ self.join_thread()
+ }
+
+ /// Stop `BackgroundProcessor`'s thread, returning any error that occurred while persisting
+ /// [`ChannelManager`].
+ ///
+ /// # Panics
+ ///
+ /// This function panics if the background thread has panicked such as while persisting or
+ /// handling events.
+ ///
+ /// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager