@@ -29,14 +29,16 @@ use std::ops::Deref;
29
29
/// `BackgroundProcessor` takes care of tasks that (1) need to happen periodically to keep
30
30
/// Rust-Lightning running properly, and (2) either can or should be run in the background. Its
31
31
/// responsibilities are:
32
- /// * Processing [`MessageSendEvent`]s by calling [`PeerManager::process_events`].
33
32
/// * Processing [`Event`]s with a user-provided [`EventHandler`].
34
33
/// * Monitoring whether the [`ChannelManager`] needs to be re-persisted to disk, and if so,
35
34
/// writing it to disk/backups by invoking the callback given to it at startup.
36
35
/// [`ChannelManager`] persistence should be done in the background.
37
36
/// * Calling [`ChannelManager::timer_tick_occurred`] and [`PeerManager::timer_tick_occurred`]
38
37
/// at the appropriate intervals.
39
38
///
39
+ /// It will also call [`PeerManager::process_events`] periodically though this shouldn't be relied
40
+ /// upon as doing so may result in high latency.
41
+ ///
40
42
/// # Note
41
43
///
42
44
/// If [`ChannelManager`] persistence fails and the persisted manager becomes out-of-date, then
@@ -46,7 +48,6 @@ use std::ops::Deref;
46
48
///
47
49
/// [`ChannelMonitor`]: lightning::chain::channelmonitor::ChannelMonitor
48
50
/// [`Event`]: lightning::util::events::Event
49
- /// [`MessageSendEvent`]: lightning::util::events::MessageSendEvent
50
51
#[ must_use = "BackgroundProcessor will immediately stop on drop. It should be stored until shutdown." ]
51
52
pub struct BackgroundProcessor {
52
53
stop_thread : Arc < AtomicBool > ,
0 commit comments