@@ -480,10 +480,11 @@ pub struct ChainParameters {
480
480
}
481
481
482
482
/// Whenever we release the `ChannelManager`'s `total_consistency_lock`, from read mode, it is
483
- /// desirable to notify any listeners on `wait_timeout`/`wait` that new updates are available for
484
- /// persistence. Therefore, this struct is responsible for locking the total consistency lock and,
485
- /// upon going out of scope, sending the aforementioned notification (since the lock being released
486
- /// indicates that the updates are ready for persistence).
483
+ /// desirable to notify any listeners on `await_persistable_update_timeout`/
484
+ /// `await_persistable_update` that new updates are available for persistence. Therefore, this
485
+ /// struct is responsible for locking the total consistency lock and, upon going out of scope,
486
+ /// sending the aforementioned notification (since the lock being released indicates that the
487
+ /// updates are ready for persistence).
487
488
struct PersistenceNotifierGuard < ' a > {
488
489
persistence_notifier : & ' a PersistenceNotifier ,
489
490
// We hold onto this result so the lock doesn't get released immediately.
@@ -3407,16 +3408,18 @@ impl<Signer: Sign, M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelMana
3407
3408
}
3408
3409
3409
3410
/// Blocks until ChannelManager needs to be persisted or a timeout is reached. It returns a bool
3410
- /// indicating whether persistence is necessary. Only one listener on `wait_timeout` is
3411
- /// guaranteed to be woken up.
3411
+ /// indicating whether persistence is necessary. Only one listener on
3412
+ /// `await_persistable_update` or `await_persistable_update_timeout` is guaranteed to be woken
3413
+ /// up.
3412
3414
/// Note that the feature `allow_wallclock_use` must be enabled to use this function.
3413
3415
#[ cfg( any( test, feature = "allow_wallclock_use" ) ) ]
3414
3416
pub fn await_persistable_update_timeout ( & self , max_wait : Duration ) -> bool {
3415
3417
self . persistence_notifier . wait_timeout ( max_wait)
3416
3418
}
3417
3419
3418
- /// Blocks until ChannelManager needs to be persisted. Only one listener on `wait` is
3419
- /// guaranteed to be woken up.
3420
+ /// Blocks until ChannelManager needs to be persisted. Only one listener on
3421
+ /// `await_persistable_update` or `await_persistable_update_timeout` is guaranteed to be woken
3422
+ /// up.
3420
3423
pub fn await_persistable_update ( & self ) {
3421
3424
self . persistence_notifier . wait ( )
3422
3425
}
@@ -3669,7 +3672,7 @@ impl<Signer: Sign, M: Deref + Sync + Send, T: Deref + Sync + Send, K: Deref + Sy
3669
3672
}
3670
3673
3671
3674
/// Used to signal to the ChannelManager persister that the manager needs to be re-persisted to
3672
- /// disk/backups, through `wait_timeout ` and `wait `.
3675
+ /// disk/backups, through `await_persistable_update_timeout ` and `await_persistable_update `.
3673
3676
struct PersistenceNotifier {
3674
3677
/// Users won't access the persistence_lock directly, but rather wait on its bool using
3675
3678
/// `wait_timeout` and `wait`.
0 commit comments