Skip to content

Rewrite sync bg processor #3820

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
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
14 changes: 2 additions & 12 deletions lightning-background-processor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -902,18 +902,8 @@ where
},
}
},
|t| sleeper(Duration::from_secs(t)),
|fut: &mut SleepFuture, _| {
let mut waker = dummy_waker();
let mut ctx = task::Context::from_waker(&mut waker);
match core::pin::Pin::new(fut).poll(&mut ctx) {
task::Poll::Ready(exit) => {
should_break = exit;
true
},
task::Poll::Pending => false,
}
},
|_| Instant::now(),
|time: &Instant, dur| time.elapsed().as_secs() > dur,
Copy link
Contributor Author

@joostjager joostjager Jun 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why this wasn't done in the first place? All the timer checks seem to be non-blocking.

mobile_interruptable_platform,
fetch_time,
)
Expand Down