#pragma once namespace Utils::Thread { bool SetName(HANDLE t, const std::string& name); bool SetName(DWORD id, const std::string& name); bool SetName(std::thread& t, const std::string& name); bool SetName(const std::string& name); template std::thread CreateNamedThread(const std::string& name, Args&&... args) { auto t = std::thread(std::forward(args)...); SetName(t, name); return t; } std::vector GetThreadIds(); void ForEachThread(const std::function& callback); void SuspendOtherThreads(); void ResumeOtherThreads(); }