dfx 0.1.0
Linux-based dynamic dataflow executor
Loading...
Searching...
No Matches
NodeTaskExecutor.hpp
1// SPDX-FileCopyrightText: 2026 Vincent Leroy
2// SPDX-License-Identifier: MIT
3//
4// This file is part of dfx.
5//
6// Licensed under the MIT License. See the LICENSE file in the project root
7// for full license information.
8
9#pragma once
10
11// Standard includes
12#include <memory>
13#include <span>
14
15// Project includes
16#include "Task.hpp"
17
18namespace dfx::Runtime::Api
19{
41{
42public:
44 virtual ~NodeTaskExecutor() = default;
45
55 virtual bool pushTask(TaskPtr task) = 0;
56
65 virtual std::size_t pushTasks(std::span<TaskPtr> tasks) = 0;
66};
67
69using NodeTaskExecutorPtr = std::unique_ptr<NodeTaskExecutor>;
70} // !namespace dfx::Runtime::Api
Interface for offloading task execution from the global pool to a specific node context.
Definition NodeTaskExecutor.hpp:41
virtual std::size_t pushTasks(std::span< TaskPtr > tasks)=0
Pushes a list of task into the node's private execution queue.
virtual ~NodeTaskExecutor()=default
Virtual destructor.
virtual bool pushTask(TaskPtr task)=0
Pushes a task into the node's private execution queue.
Definition Node.hpp:48
std::unique_ptr< Task > TaskPtr
Unique ownership pointer for tasks.
Definition Task.hpp:102
std::unique_ptr< NodeTaskExecutor > NodeTaskExecutorPtr
Unique ownership pointer type for NodeTaskExecutor.
Definition Node.hpp:52