Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lightning/src/util/wakers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,8 @@ impl Future {
/// Registers a callback to be called upon completion of this future. If the future has already
/// completed, the callback will be called immediately.
///
/// Note that callbacks *must not* reenter this [`Future`] or the corresponding [`Notifier`].
///
/// This is not exported to bindings users, use the bindings-only `register_callback_fn` instead
pub fn register_callback(&self, callback: Box<dyn FutureCallback>) {
let mut state = self.state.lock().unwrap();
Expand All @@ -182,6 +184,8 @@ impl Future {
// here.
/// Registers a callback to be called upon completion of this future. If the future has already
/// completed, the callback will be called immediately.
///
/// Note that callbacks *must not* reenter this [`Future`] or the corresponding [`Notifier`].
#[cfg(c_bindings)]
pub fn register_callback_fn<F: 'static + FutureCallback>(&self, callback: F) {
self.register_callback(Box::new(callback));
Expand Down
Loading