Expose an option to substantially reduce sleep time in futures BP 2023-03-mon-wake-bp
authorMatt Corallo <git@bluematt.me>
Tue, 14 Mar 2023 21:23:21 +0000 (21:23 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 3 Apr 2023 16:49:54 +0000 (16:49 +0000)
commit94a11f779115d6a96b2042f917cd809fc9595e83
treeeeb640e0c66e55b200601eef5e16aed788de5056
parent6890e4334254a22b39b7402a0bbf0b75748eb907
Expose an option to substantially reduce sleep time in futures BP

Some users have suggested that waking every 100ms can be
CPU-intensive in deployments with hundreds or thousands of nodes
all running on the same machine. Thus, we add an option to the
futures-based `background-processor` to avoid waking every 100ms to
check for iOS having backgrounded our app and cut our TCP sockets.

This cuts the normal sleep time down from 100ms to 10s, for those
who turn it on.
lightning-background-processor/src/lib.rs