MCPcopy Create free account
hub / github.com/TranslucentTB/TranslucentTB / ~XamlThreadPool

Method ~XamlThreadPool

TranslucentTB/uwp/xamlthreadpool.cpp:25–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

23}
24
25XamlThreadPool::~XamlThreadPool()
26{
27 if (const auto size = m_Threads.size(); size != 0)
28 {
29 std::vector<wil::unique_handle> threads;
30 threads.reserve(size);
31
32 for (auto &xamlThread : m_Threads)
33 {
34 threads.push_back(xamlThread->Delete());
35 static_cast<void>(xamlThread.release());
36 }
37
38 if (WaitForMultipleObjects(wil::safe_cast<DWORD>(size), threads.data()->addressof(), true, INFINITE) == WAIT_FAILED)
39 {
40 LastErrorHandle(spdlog::level::warn, L"Failed to wait for thread termination");
41 }
42 }
43}

Callers

nothing calls this directly

Calls 1

DeleteMethod · 0.80

Tested by

no test coverage detected