![]() |
dfx 0.1.0
Linux-based dynamic dataflow executor
|
Host-side implementation of a Task Executor that delegates to a C plugin. More...
#include <dfx-plugins/bridges/node/CNodeExecutor.hpp>
Public Member Functions | |
| CNodeExecutor (Plugin const &plugin, dfx_task_executor_interface_t interface) | |
| Constructs a C-bridge for a task executor. | |
| ~CNodeExecutor () | |
Destructor. Calls the plugin's destroy function. | |
| bool | pushTask (Runtime::Api::TaskPtr task) override |
| Forwards a single task to the plugin. | |
| std::size_t | pushTasks (std::span< Runtime::Api::TaskPtr > tasks) override |
| Forwards multiple tasks to the plugin. | |
| Public Member Functions inherited from dfx::Runtime::Api::NodeTaskExecutor | |
| virtual | ~NodeTaskExecutor ()=default |
| Virtual destructor. | |
Host-side implementation of a Task Executor that delegates to a C plugin.
This class translates the native C++ task execution requests into C-ABI calls. When the Runtime::Api::NodeReactor produces a task for a node, this executor wraps that task into a dfx_task_api_t and pushes it to the plugin's custom scheduler.
run function in the task API. | dfx::Plugins::CNodeExecutor::CNodeExecutor | ( | Plugin const & | plugin, |
| dfx_task_executor_interface_t | interface ) |
Constructs a C-bridge for a task executor.
| plugin | The owning plugin (used for logging and resource context). |
| interface | The vtable of C functions provided by the plugin. |
| dfx::Plugins::CNodeExecutor::~CNodeExecutor | ( | ) |
Destructor. Calls the plugin's destroy function.
|
overridevirtual |
Forwards a single task to the plugin.
Creates a TaskContext, generates a dfx_task_api_t, and invokes dfx_task_executor_interface_t::push_task.
| task | The native C++ task. |
Implements dfx::Runtime::Api::NodeTaskExecutor.
|
overridevirtual |
Forwards multiple tasks to the plugin.
| tasks | A span of native C++ tasks. |
Implements dfx::Runtime::Api::NodeTaskExecutor.