vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
executor.hpp
1// SPDX-License-Identifier: LGPL-2.1-or-later
2
3#pragma once
4
5#include <vitrio/concurrency/completion_notifier.hpp>
6#include <vitrio/concurrency/task.hpp>
7#include <vitrio/export.hpp>
8
9#include <memory>
10
11namespace vitrio
12{
13
25class VITRIO_API executor
26{
27public:
28 executor() = default;
29 executor(const executor &other) = default;
30 executor(executor &&other) = default;
31 virtual ~executor() = default;
32
33 executor& operator=(const executor &other) = default;
34 executor& operator=(executor &&other) = default;
35
42 virtual void submit(
43 std::unique_ptr<task> t,
44 std::shared_ptr<completion_notifier> notifier
45 ) = 0;
46};
47
48} // namespace vitrio
Where a task is handed off to run, now or later.
Definition executor.hpp:26
virtual void submit(std::unique_ptr< task > t, std::shared_ptr< completion_notifier > notifier)=0
Hand a unit of work off to this executor.