Replies: 1 comment 2 replies
-
let mut handles = Vec::new();
for system in &system_box.system {
let canvas = canvas.clone();
let handle = tokio::spawn((system)(canvas));
handles.push(handle);
}
for handle in handles {
handle.await.unwrap();
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions