51 ThreadPool(
unsigned int threads = std::thread::hardware_concurrency(),
bool little =
false);
57 template<
typename Func,
typename... Args, std::enable_if_t<std::is_invocable_v<Func&&, Args&&...>,
bool> =
true>
58 auto execute(Func&& func, Args&&... args) -> std::future<
decltype(func(args...))>;
66 moodycamel::ConcurrentQueue<fu2::unique_function<void()>> _tasks;
67 std::atomic<unsigned int> _size;
68 std::vector<std::thread> _pool;
69 std::condition_variable _new_task;