fix: change where TaskHandle is borrowed to prevent repeat output fetches
This commit is contained in:
1 parent
c8efb00175
commit
9fbe4c2fd8
47 files changed
+323
-513
No files matched your search
@@ -29,7 +29,7 @@
|
||||
//! ## Key Concepts
|
||||
//! - **Fan-in**: Multiple tasks' outputs are consumed by a single downstream task
|
||||
//! - **Aggregation**: Combining multiple values into a single result
|
||||
//! - **Parameter order**: The order in `.depends_on((a, b, c))` must match
|
||||
//! - **Parameter order**: The order in `.depends_on((&a, &b, &c))` must match
|
||||
//! the function signature `fn run(a: &T1, b: &T2, c: &T3)`
|
||||
//!
|
||||
//! ## Use Cases
|
||||
@@ -129,7 +129,7 @@ async fn main() {
|
||||
// Single downstream task consuming all values
|
||||
let profile = dag
|
||||
.add_task(BuildProfile)
|
||||
.depends_on((name, age, city, active));
|
||||
.depends_on((&name, &age, &city, &active));
|
||||
|
||||
// Run the DAG
|
||||
println!("Running fan-in DAG...\n");
|
||||
@@ -139,5 +139,5 @@ async fn main() {
|
||||
.unwrap();
|
||||
|
||||
// Print result
|
||||
println!("\n{}", output.get(profile).unwrap());
|
||||
println!("\n{}", output.get(profile));
|
||||
}
|
||||
Reference in new issue
Block a user