1#pragma once
2
3#include <vector>
4#include <set>
5#include <mutex>
6#include <Processors/IProcessor.h>
7
8template <typename>
9class ThreadPoolImpl;
10class ThreadFromGlobalPool;
11using ThreadPool = ThreadPoolImpl<ThreadFromGlobalPool>;
12
13namespace DB
14{
15
16/** Wraps pipeline in a single processor.
17 * This processor has no inputs and outputs and just executes the pipeline,
18 * performing all synchronous work within a threadpool.
19 */
20//class ParallelPipelineExecutor : public IProcessor
21//{
22//private:
23// Processors processors;
24// ThreadPool & pool;
25//
26// std::set<IProcessor *> active_processors;
27// std::mutex mutex;
28//
29// IProcessor * current_processor = nullptr;
30// Status current_status;
31//
32//public:
33// ParallelPipelineExecutor(const Processors & processors, ThreadPool & pool);
34//
35// String getName() const override { return "ParallelPipelineExecutor"; }
36//
37// Status prepare() override;
38// void schedule(EventCounter & watch) override;
39//};
40
41}
42