ClickHouse/src/Disks/Executor.h

18 lines
289 B
C++
Raw Normal View History

#pragma once
2020-08-10 11:40:31 +00:00
#include <future>
#include <functional>
namespace DB
{
/// Interface to run task asynchronously with possibility to wait for execution.
class Executor
{
public:
virtual ~Executor() = default;
virtual std::future<void> execute(std::function<void()> task) = 0;
};
}