dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
dfx::Runtime Namespace Reference

Classes

class  ASyncTask
 Zero-overhead Task wrapper executing a stored callable. More...
class  FdListener
 Background FD event listener running its own polling thread. More...
class  NodeTask
 Task wrapper that executes a callable under a node lock and only if the node is still alive. More...
class  PackagedTask
 A task implementation that wraps a callable object and provides a future for the result. More...
class  Scheduler
 Runtime scheduler and execution bridge between graph delivery, node execution, and FD events. More...
struct  ThreadData
 Per-thread runtime metadata associated with a ThreadPool worker. More...
class  ThreadPool
 Runtime thread pool executing Api::Task instances with priorities and FIFO ordering. More...

Functions

template<typename Func, typename ... Args>
auto makeASyncTask (Func &&func, Args &&... args)
 Helper to create an ASyncTask with type decay.
template<typename Func, typename ... Args>
auto makeNodeTask (Func &&func, Args &&... args)
 Helper to create a NodeTask with type decay.
template<typename Func, typename ... Args>
auto makePackagedTask (Func &&func, Args &&... args)
 Helper factory function to create a PackagedTask wrapped in a std::unique_ptr.

Function Documentation

◆ makeASyncTask()

template<typename Func, typename ... Args>
auto dfx::Runtime::makeASyncTask ( Func && func,
Args &&... args )

Helper to create an ASyncTask with type decay.

This helper:

  • applies std::decay_t to Func so the callable is stored by value safely,
  • forwards func and args into the task constructor,
  • returns the result as std::unique_ptr<ASyncTask>.
Template Parameters
FuncCallable type (possibly a reference / cv-qualified).
ArgsAdditional arguments forwarded to the ASyncTask constructor (typically the task priority).
Parameters
funcCallable to store in the created task.
argsAdditional constructor arguments (e.g. priority).
Returns
A std::unique_ptr<ASyncTask> owning the created task.

◆ makeNodeTask()

template<typename Func, typename ... Args>
auto dfx::Runtime::makeNodeTask ( Func && func,
Args &&... args )

Helper to create a NodeTask with type decay.

Applies std::decay_t to the callable type so the callable is stored by value safely.

Template Parameters
FuncCallable type (possibly a reference / cv-qualified).
ArgsAdditional arguments forwarded to the NodeTask constructor.
Parameters
funcCallable to store in the created task.
argsConstructor arguments: typically Core::NodeWPtr node and optionally priority.
Returns
A std::unique_ptr<NodeTask> owning the created task.

◆ makePackagedTask()

template<typename Func, typename ... Args>
auto dfx::Runtime::makePackagedTask ( Func && func,
Args &&... args )

Helper factory function to create a PackagedTask wrapped in a std::unique_ptr.

This utility deduces the return type of the provided function automatically.

Template Parameters
FuncThe type of the function or callable.
ArgsThe types of the arguments (e.g., priority).
Parameters
funcThe callable to package.
argsArguments to pass to the PackagedTask constructor.
Returns
auto A std::unique_ptr to a PackagedTask of the appropriate return type.