@@ -714,7 +714,12 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
714714///
715715/// let mobile_interruptable_platform = false;
716716///
717- /// let handle = tokio::spawn(async move {
717+ #[ cfg_attr( feature = "std" , doc = " let handle = tokio::spawn(async move {" ) ]
718+ #[ cfg_attr(
719+ not( feature = "std" ) ,
720+ doc = " let rt = tokio::runtime::Builder::new_current_thread().build().unwrap();"
721+ ) ]
722+ #[ cfg_attr( not( feature = "std" ) , doc = " rt.block_on(async move {" ) ]
718723/// process_events_async(
719724/// background_persister,
720725/// |e| background_event_handler.handle_event(e),
@@ -736,7 +741,7 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
736741///
737742/// // Stop the background processing.
738743/// stop_sender.send(()).unwrap();
739- /// handle.await.unwrap();
744+ # [ cfg_attr ( feature = "std" , doc = " handle.await.unwrap()" ) ]
740745/// # }
741746///```
742747#[ cfg( feature = "futures" ) ]
@@ -761,7 +766,7 @@ pub async fn process_events_async<
761766 PGS : ' static + Deref < Target = P2PGossipSync < G , UL , L > > + Send + Sync ,
762767 RGS : ' static + Deref < Target = RapidGossipSync < G , L > > + Send ,
763768 PM : ' static + Deref + Send + Sync ,
764- LM : ' static + Deref + Send + Sync ,
769+ LM : ' static + Deref ,
765770 S : ' static + Deref < Target = SC > + Send + Sync ,
766771 SC : for < ' b > WriteableScore < ' b > ,
767772 SleepFuture : core:: future:: Future < Output = bool > + core:: marker:: Unpin ,
@@ -784,7 +789,7 @@ where
784789 CM :: Target : AChannelManager + Send + Sync ,
785790 OM :: Target : AOnionMessenger + Send + Sync ,
786791 PM :: Target : APeerManager + Send + Sync ,
787- LM :: Target : ALiquidityManager + Send + Sync ,
792+ LM :: Target : ALiquidityManager ,
788793{
789794 let mut should_break = false ;
790795 let async_event_handler = |event| {
0 commit comments