Add a `Future` which can receive manager persistence events
authorMatt Corallo <git@bluematt.me>
Tue, 9 Aug 2022 04:15:21 +0000 (04:15 +0000)
committerMatt Corallo <git@bluematt.me>
Tue, 6 Sep 2022 17:42:21 +0000 (17:42 +0000)
commitc6890cfc3317c0b1ba4d1e6cd71b3bb75386571e
treed89c21353df036f7e8ec46b09ea24c7c89f00402
parent2035cebe8af3b223d51bdc8a5a5962de70929493
Add a `Future` which can receive manager persistence events

This allows users who don't wish to block a full thread to receive
persistence events.

The `Future` added here is really just a trivial list of callbacks,
but from that we can build a (somewhat ineffecient)
std::future::Future implementation and can (at least once a mapping
for Box<dyn Trait> is added) include the future in no-std bindings
as well.

Fixes #1595
lightning/src/ln/channelmanager.rs
lightning/src/util/wakers.rs