|
VLink
2.0.0
A high-performance communication middleware
|
Directed acyclic task graph with condition branching, cycle guard and DOT export. More...
#include <memory>#include <string>#include <type_traits>#include <unordered_set>#include <utility>#include <vector>#include "./functional.h"#include "./macros.h"#include "./traits.h"Go to the source code of this file.
Classes | |
| class | vlink::GraphTask |
| DAG node carrying a callback, predecessor and successor links, and run-time state. More... | |
Namespaces | |
| vlink | |
Typedefs | |
| using | vlink::GraphTaskPtr = std::shared_ptr< GraphTask > |
Convenience alias for the canonical shared_ptr<GraphTask> handle. More... | |
Directed acyclic task graph with condition branching, cycle guard and DOT export.
GraphTask is VLink's data-flow primitive: every node carries a callback, a list of predecessors and a list of successors, and is submitted to any engine that exposes post_task / post_task_with_priority – MessageLoop, MultiLoop or ThreadPool. Edges are declared with precede / succeed (Taskflow convention) and a process-wide topology mutex serialises all mutators across every graph instance.
* +---+ precede +---+ precede +---+ * | A | ----------> | B | ----------> | C | * +-+-+ +-+-+ +-+-+ * | condition | | * v v v * +-----+ +-----+ +-----+ * | D0 | | E | | F | * +-----+ +-----+ +-----+ * ^ * | D0/D1/... condition task selects which successor branch fires * +-----+ * | D1 | * +-----+ *
| Factory | Callback signature | Use case |
|---|---|---|
create(callback) | void() | Regular work node |
create_condition(callback) | int() | Branch selector (return value picks) |
| Policy | Behaviour |
|---|---|
kPolicyOnce | Runs exactly once per execute pass (default) |
kPolicyMultiple | Runs multiple times within one execute pass |
kPolicyWaitAll | Waits for every predecessor before running |