Ensure `background-processor` exits after any sleep future says to
authorMatt Corallo <git@bluematt.me>
Mon, 3 Apr 2023 20:15:04 +0000 (20:15 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 4 Apr 2023 20:59:56 +0000 (20:59 +0000)
commitca367f5d085cdc8e9a3e3bca4a846d840eea7c26
tree1f60a60221332b9f4b69651452ed61f13a82b247
parent8676c5aa4e18086bf56a21966de01f173b6b6983
Ensure `background-processor` exits after any sleep future says to

If the user's sleep future passed to an async background processor
only returns true for exiting once and then reverts back to false,
we should exit anyway when we get a chance to. We do to this here
by always ensuring we check the exit flag even when only polling
sleep futures with no intent to (yet) exit. This is utilized in the
tests added in the coming commit(s).
lightning-background-processor/src/lib.rs