Fable says this, obviously fixed with lightningdevkit/ldk-node#926 but we should probably spawn not join:
- The join (lib.rs:667-713) runs Spark::init and LightningWallet::init concurrently — but tokio::join! is single-task
concurrency: both futures are polled on the same task, interleaving only at await points. And LightningWallet::init
(lightning_wallet.rs:61-214) contains zero awaits: Builder::build_with_store (lightning_wallet.rs:176) is a synchronous fn
that internally does block_in_place(|| handle.block_on(...)) for all its store reads, and Node::start()
(lightning_wallet.rs:204) is also sync. So the entire LDK init is one long poll that blocks the shared task/thread.
Fable says this, obviously fixed with lightningdevkit/ldk-node#926 but we should probably
spawnnotjoin:concurrency: both futures are polled on the same task, interleaving only at await points. And LightningWallet::init
(lightning_wallet.rs:61-214) contains zero awaits: Builder::build_with_store (lightning_wallet.rs:176) is a synchronous fn
that internally does block_in_place(|| handle.block_on(...)) for all its store reads, and Node::start()
(lightning_wallet.rs:204) is also sync. So the entire LDK init is one long poll that blocks the shared task/thread.