![]() |
dfx 0.1.0
Linux-based dynamic dataflow executor
|
Interface for a plugin-defined task executor. More...
#include <dfx-plugins-interface/PluginInterface.h>
Public Attributes | |
| dfx_task_executor_handle_t(* | build )(void) |
| Instantiates the plugin's internal executor state. | |
| void(* | destroy )(dfx_task_executor_handle_t handle) |
| Destroys the executor instance and frees associated memory. | |
| int(* | push_task )(dfx_task_executor_handle_t handle, dfx_task_api_t const *task_api, size_t task_api_size) |
| Enqueues a task for execution within the plugin's context. | |
Interface for a plugin-defined task executor.
This vtable allows a node to "hijack" its own task execution. Instead of the host running tasks on the global thread pool, it will forward them to this interface.
| dfx_task_executor_handle_t(* dfx_task_executor_interface_t::build) (void) |
Instantiates the plugin's internal executor state.
| void(* dfx_task_executor_interface_t::destroy) (dfx_task_executor_handle_t handle) |
Destroys the executor instance and frees associated memory.
| [in] | handle | The executor handle returned by build. |
| int(* dfx_task_executor_interface_t::push_task) (dfx_task_executor_handle_t handle, dfx_task_api_t const *task_api, size_t task_api_size) |
Enqueues a task for execution within the plugin's context.
This is called by the host's NodeReactor when an event triggers. The plugin is expected to store the task and call dfx_task_api_t::run on its own thread(s).
If the plugin tries to run the task immediately on the calling thread then the task will not be run and an error will be returned by dfx_task_api_t::run.
| [in] | handle | The executor handle returned by build. |
| [in] | task_api | API to interact with and run the task. |
| [in] | task_api_size | Size of the dfx_task_api_t. |