@@ -714,7 +714,9 @@ 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( not( feature = "std" ) , doc = " let rt = tokio::runtime::Builder::new_current_thread().build().unwrap();" ) ]
719+ #[ cfg_attr( not( feature = "std" ) , doc = " rt.block_on(async move {" ) ]
718720/// process_events_async(
719721/// background_persister,
720722/// |e| background_event_handler.handle_event(e),
@@ -736,7 +738,7 @@ use futures_util::{dummy_waker, OptionalSelector, Selector, SelectorOutput};
736738///
737739/// // Stop the background processing.
738740/// stop_sender.send(()).unwrap();
739- /// handle.await.unwrap();
741+ # [ cfg_attr ( feature = "std" , doc = " handle.await.unwrap()" ) ]
740742/// # }
741743///```
742744#[ cfg( feature = "futures" ) ]
@@ -761,7 +763,7 @@ pub async fn process_events_async<
761763 PGS : ' static + Deref < Target = P2PGossipSync < G , UL , L > > + Send + Sync ,
762764 RGS : ' static + Deref < Target = RapidGossipSync < G , L > > + Send ,
763765 PM : ' static + Deref + Send + Sync ,
764- LM : ' static + Deref + Send + Sync ,
766+ LM : ' static + Deref ,
765767 S : ' static + Deref < Target = SC > + Send + Sync ,
766768 SC : for < ' b > WriteableScore < ' b > ,
767769 SleepFuture : core:: future:: Future < Output = bool > + core:: marker:: Unpin ,
@@ -784,7 +786,7 @@ where
784786 CM :: Target : AChannelManager + Send + Sync ,
785787 OM :: Target : AOnionMessenger + Send + Sync ,
786788 PM :: Target : APeerManager + Send + Sync ,
787- LM :: Target : ALiquidityManager + Send + Sync ,
789+ LM :: Target : ALiquidityManager ,
788790{
789791 let mut should_break = false ;
790792 let async_event_handler = |event| {
0 commit comments