| 68 | { |
| 69 | template <typename Callable, typename... Args> |
| 70 | static std::thread makeThread(std::string name, Callable&& f, Args&&... args) |
| 71 | { |
| 72 | return std::thread( |
| 73 | [](std::string name, Callable&& f, Args&&... args) |
| 74 | { |
| 75 | assert(name.length() < 20); |
| 76 | wchar_t nativeName[20]; |
| 77 | mbstowcs(nativeName, name.c_str(), name.length() + 1); |
| 78 | SetThreadDescription(GetCurrentThread(), nativeName); |
| 79 | f(args...); |
| 80 | }, |
| 81 | std::move(name), |
| 82 | std::forward<Callable>(f), |
| 83 | std::forward<Args>(args)...); |
| 84 | } |
| 85 | }; |
| 86 | |
| 87 | } // namespace windows |
nothing calls this directly
no outgoing calls
no test coverage detected