refactor: make DagRunner interface single-threaded
This commit is contained in:
1 parent
d83a815ed0
commit
e4fc0b0d44
25 files changed
+416
-617
No files matched your search
+1
-1
@@ -15,7 +15,7 @@ impl Value { async fn run(&self) -> i32 { self.0 } }
|
||||
#[task]
|
||||
impl Add { async fn run(a: &i32, b: &i32) -> i32 { a + b } }
|
||||
|
||||
let dag = DagRunner::new();
|
||||
let mut dag = DagRunner::new();
|
||||
let x = dag.add_task(Value(2));
|
||||
let y = dag.add_task(Value(3));
|
||||
let sum = dag.add_task(Add).depends_on((x, y));
|
||||
|
||||
Reference in new issue
Block a user