Explorar el Código

试试异步执行的延迟。

skyffire hace 1 año
padre
commit
b0e98b1914
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      standard/src/gate_swap.rs

+ 4 - 1
standard/src/gate_swap.rs

@@ -604,7 +604,10 @@ impl Platform for GateSwap {
         }
 
         let futures = FuturesUnordered::from_iter(handles);
-        let _: Result<Vec<_>, _> = futures.try_collect().await;
+        spawn(async move {
+            // 等待所有任务完成
+            let _: Result<Vec<_>, _> = futures.try_collect().await;
+        });
     }
 }