16#include "../../Plugin.hpp"
18#include <dfx-runtime-api/NodeTaskExecutor.hpp>
19#include <dfx-utilities/sync-queues/PriorityStableQueue.hpp>
42 std::atomic_flag hasBeenPushed;
72 std::size_t
pushTasks(std::span<Runtime::Api::TaskPtr> tasks)
override;
77 void _onTaskFinished(TaskContext
const & ctx)
noexcept;
85 std::vector<std::unique_ptr<TaskContext>> _tasks;
C-ABI for the dfx framework plugin system.
void * dfx_task_executor_handle_t
Opaque handle representing a custom node executor created by the plugin.
Definition PluginInterface.h:90
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.
~CNodeExecutor()
Destructor. Calls the plugin's destroy function.
CNodeExecutor(Plugin const &plugin, dfx_task_executor_interface_t interface)
Constructs a C-bridge for a task executor.
Manager for a loaded plugin shared library.
Definition Plugin.hpp:38
Interface for offloading task execution from the global pool to a specific node context.
Definition NodeTaskExecutor.hpp:41
Definition MessageApi.hpp:16
std::unique_ptr< Task > TaskPtr
Unique ownership pointer for tasks.
Definition Task.hpp:102
Host-provided API for interacting with a scheduled task.
Definition PluginInterface.h:308
Interface for a plugin-defined task executor.
Definition PluginInterface.h:345