NeoGraph 0.16.0
A C++20 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::program::ProgramExecutorIdentity Struct Reference

What ProgramRuntime assumes about RuntimeConfig::executor (#557). More...

#include <runtime.h>

Public Attributes

bool host_pumped = false
 A host's event loop runs the executor, one turn at a time, and no thread of the process can wait for work on it.
 
std::function< bool()> running_in_this_thread
 True when the calling thread is one the executor runs handlers on.
 

Detailed Description

What ProgramRuntime assumes about RuntimeConfig::executor (#557).

Both members are detected for the executors the runtime can see into, so a host that gives an io_context, a thread_pool, a strand of either, or the executor of an async::HostLoop sets neither.

Definition at line 132 of file runtime.h.

Member Data Documentation

◆ host_pumped

bool neograph::program::ProgramExecutorIdentity::host_pumped = false

A host's event loop runs the executor, one turn at a time, and no thread of the process can wait for work on it.

A synchronous call that waits for a Program is then refused instead of hanging. Detected for the executor of an async::HostLoop (async::is_host_pumped); set it for another executor that a host pumps.

Definition at line 138 of file runtime.h.

◆ running_in_this_thread

std::function<bool()> neograph::program::ProgramExecutorIdentity::running_in_this_thread

True when the calling thread is one the executor runs handlers on.

A call that waits for a Program, made from such a thread, waits for work only that thread can do, so it is refused. Detected for an executor over an io_context or a thread_pool; set it for any other executor that has threads.

Definition at line 144 of file runtime.h.


The documentation for this struct was generated from the following file: