| 89 | } |
| 90 | |
| 91 | winrt::fire_and_forget XamlThread::ThreadDeinit() |
| 92 | { |
| 93 | co_await wil::resume_foreground(m_Dispatcher, winrt::Windows::System::DispatcherQueuePriority::Low); |
| 94 | |
| 95 | // only called during destruction of thread pool, so no locking needed. |
| 96 | m_CurrentWindow.reset(); |
| 97 | |
| 98 | m_Source = nullptr; |
| 99 | m_Manager.Close(); |
| 100 | m_Manager = nullptr; |
| 101 | |
| 102 | PostQuitMessage(0); |
| 103 | } |
| 104 | |
| 105 | XamlThread::XamlThread() : |
| 106 | m_Dispatcher(nullptr), |