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  Scheduler
 Runtime scheduler and execution bridge between graph delivery, node execution, and FD events. More...
class  Task
 Polymorphic unit of work executed by the runtime (typically by ThreadPool). More...
struct  ThreadData
 Per-thread runtime metadata associated with a ThreadPool worker. More...
class  ThreadPool
 Runtime thread pool executing Task instances with priorities and FIFO ordering. More...

Concepts

concept  DerivedFromTask
 Convenience concept for constraining templates to Task-derived types.

Typedefs

using TaskPtr = std::unique_ptr<Task>
 Unique ownership pointer for tasks.

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.

Typedef Documentation

◆ TaskPtr

using dfx::Runtime::TaskPtr = std::unique_ptr<Task>

Unique ownership pointer for tasks.

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.