mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-14 02:12:21 +00:00
18 lines
289 B
C++
18 lines
289 B
C++
|
#pragma once
|
||
|
|
||
|
#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;
|
||
|
};
|
||
|
|
||
|
}
|