Skip to content

Commit e8fbcf4

Browse files
committed
f - Add documentation for stop and join panics
1 parent 038efad commit e8fbcf4

File tree

1 file changed

+10
-0
lines changed
  • lightning-background-processor/src

1 file changed

+10
-0
lines changed

lightning-background-processor/src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ impl BackgroundProcessor {
166166
/// Join `BackgroundProcessor`'s thread, returning any error that occurred while persisting
167167
/// [`ChannelManager`].
168168
///
169+
/// # Panics
170+
///
171+
/// This function panics if the background thread has panicked such as while persisting or
172+
/// handling events.
173+
///
169174
/// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
170175
pub fn join(mut self) -> Result<(), std::io::Error> {
171176
assert!(self.thread_handle.is_some());
@@ -175,6 +180,11 @@ impl BackgroundProcessor {
175180
/// Stop `BackgroundProcessor`'s thread, returning any error that occurred while persisting
176181
/// [`ChannelManager`].
177182
///
183+
/// # Panics
184+
///
185+
/// This function panics if the background thread has panicked such as while persisting or
186+
/// handling events.
187+
///
178188
/// [`ChannelManager`]: lightning::ln::channelmanager::ChannelManager
179189
pub fn stop(mut self) -> Result<(), std::io::Error> {
180190
assert!(self.thread_handle.is_some());

0 commit comments

Comments
 (0)