Class AgnocastOnlyMultiThreadedExecutor

Inheritance Relationships

Base Type

Class Documentation

class AgnocastOnlyMultiThreadedExecutor : public agnocast::AgnocastOnlyExecutor

Multi-threaded executor for Stage 2 (Agnocast-only) with configurable thread count. Used with agnocast::Node.

Public Functions

explicit AGNOCAST_PUBLIC AgnocastOnlyMultiThreadedExecutor(size_t number_of_threads = 0, bool yield_before_execute = false, int next_exec_timeout_ms = 50)

Construct the executor.

Parameters:
  • number_of_threads – Number of threads (0 = auto).

  • yield_before_execute – Yield before executing each callback.

  • next_exec_timeout_ms – Timeout in ms for Agnocast executables.

virtual AGNOCAST_PUBLIC void spin () override

Block the calling thread and process Agnocast callbacks in a loop until cancel() is called.