graph_executor/
shared.rs

1use std::collections::HashSet;
2
3#[derive(Debug)]
4pub(crate) struct NodeInfo<Key> {
5    pub depends_on: HashSet<Key>,
6    pub depended_on_by: HashSet<Key>,
7    pub failed: bool,
8    pub priority: usize,
9}
10
11pub struct ExecOptions {
12    /// The maximum amount of promises that can be executing at the same time. When not provided, we do not limit the number of concurrent tasks and run tasks as soon as they are unblocked
13    pub concurrency: usize,
14
15    /// Continues the graph even if there's an rejected task.
16    pub continue_on_fail: bool,
17  }
18
19impl Default for ExecOptions {
20    fn default() -> Self {
21        Self {
22            concurrency: usize::MAX,
23            continue_on_fail: true,
24        }
25    }
26}