|
NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
|
NodeExecutor — owns per-super-step node invocation. More...
#include <neograph/api.h>#include <neograph/graph/types.h>#include <neograph/graph/node.h>#include <neograph/graph/compiler.h>#include <neograph/graph/coordinator.h>#include <neograph/graph/node_cache.h>#include <neograph/graph/scheduler.h>#include <asio/thread_pool.hpp>#include <atomic>#include <functional>#include <map>#include <memory>#include <string>#include <unordered_map>#include <vector>Go to the source code of this file.
Classes | |
| class | neograph::graph::NodeExecutor |
| Stateless-per-call node invocation dispatcher. More... | |
NodeExecutor — owns per-super-step node invocation.
Extracted from GraphEngine::execute_graph so the three invocation paths that used to be open-coded inside the super-step loop sit behind named methods with their own invariants:
asio::experimental::make_parallel_group. Records per-worker pending writes, captures the first worker exception, and rethrows after every branch has finished. After the barrier, applies each result's writes + Command.updates to the shared state.The executor owns execute_node_with_retry_async — the innermost retry loop with exponential backoff + NodeInterrupt pass-through. Retry policies are resolved per node via a lookup callback supplied by GraphEngine at construction; the executor itself is agnostic about where the policy came from.
Thread safety: all fan-out runs on whichever executor co_await asio::this_coro::executor yields — typically GraphEngine's owned thread_pool. Multiple concurrent executions against the same NodeExecutor instance are safe iff the underlying GraphNode subclasses are safe.
3.0 removed the sync run_one/run_parallel/run_sends twins and their process-wide Taskflow executor; sync callers drive the async peers via GraphEngine's thread_pool (see engine.cpp).
Definition in file executor.h.