#pragma once #include #include #include namespace threading { // Stuff that can execute other stuff, like threadpools, should inherit from this. class Executor { public: virtual void Run(std::function func) = 0; virtual ~Executor() {} }; class SameThreadExecutor : public Executor { public: void Run(std::function func) override; }; class NewThreadExecutor : public Executor { public: ~NewThreadExecutor() override; void Run(std::function func) override; private: std::vector threads_; }; } // namespace threading