#pragma once #include "taskflow/taskflow.hpp" inline tf::Executor* g_executor = nullptr; inline void init_taskflow() { g_executor = new tf::Executor(std::thread::hardware_concurrency()); } inline void release_taskflow() { if (g_executor) { g_executor->wait_for_all(); delete g_executor; g_executor = nullptr; } }