dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
dfx_task_api_t Struct Reference

Host-provided API for interacting with a scheduled task. More...

#include <dfx-plugins-interface/PluginInterface.h>

Public Attributes

dfx_task_handle_t handle
 Opaque handle to the host's internal task representation.
int(* get_priority )(dfx_task_handle_t handle)
 Retrieves the execution priority of the task.
int(* run )(dfx_task_handle_t handle)
 Executes the task's payload.

Detailed Description

Host-provided API for interacting with a scheduled task.

When a task is pushed to a plugin's custom executor, the host provides this API to allow the executor to interrogate task metadata (like priority) and ultimately execute the task payload.

Member Data Documentation

◆ get_priority

int(* dfx_task_api_t::get_priority) (dfx_task_handle_t handle)

Retrieves the execution priority of the task.

Parameters
[in]handleThe task handle provided in this struct.
Returns
The priority level (higher values typically indicate higher priority).

◆ handle

dfx_task_handle_t dfx_task_api_t::handle

Opaque handle to the host's internal task representation.

◆ run

int(* dfx_task_api_t::run) (dfx_task_handle_t handle)

Executes the task's payload.

This function must be called by the plugin's executor to actually perform the work associated with the task.

Parameters
[in]handleThe task handle provided in this struct.
Returns
DFX_OK on success, DFX_ERROR on failure.
Errors
On failure, errno is set to:
Note
This call is synchronous; it returns once the task work is complete.

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