diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-10-16 12:04:56 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-16 12:04:56 +0300 |
commit | 7ede65bd22ca58253348335fe0d3b489b136ec5e (patch) | |
tree | 78681b7988bdd672759aba85193ae8dc7692a1d1 /indra/llwindow | |
parent | 7547530ad1ff176513701fd4337ff0ce6569fac4 (diff) | |
parent | 401f7eecb5c011a330046ac125ce14562de7ab5e (diff) |
Merge pull request #2862 from Ansariel/marchcat/c-develop
Fix various merge issues
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index f0b099df41..bacf5325fe 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -4865,47 +4865,6 @@ bool LLWindowWin32::LLWindowWin32Thread::wakeAndDestroy() PostMessage(old_handle, WM_DUMMY_, wparam, 0x1337); } - // There are cases where window will refuse to close, - // can't wait forever on join, check state instead - LLTimer timeout; - timeout.setTimerExpirySec(2.0); - while (!getQueue().done() && !timeout.hasExpired() && mWindowHandleThrd) - { - ms_sleep(100); - } - - if (getQueue().done() || mWindowHandleThrd == NULL) - { - // Window is closed, started closing or is cleaning up - // now wait for our single thread to die. - if (mWindowHandleThrd) - { - LL_INFOS("Window") << "Window is closing, waiting on pool's thread to join, time since post: " << timeout.getElapsedSeconds() << "s" << LL_ENDL; - } - else - { - LL_DEBUGS("Window") << "Waiting on pool's thread, time since post: " << timeout.getElapsedSeconds() << "s" << LL_ENDL; - } - for (auto& pair : mThreads) - { - pair.second.join(); - } - } - else - { - // Something suspended window thread, can't afford to wait forever - // so kill thread instead - // Ex: This can happen if user starts dragging window arround (if it - // was visible) or a modal notification pops up - LL_WARNS("Window") << "Window is frozen, couldn't perform clean exit" << LL_ENDL; - - for (auto& pair : mThreads) - { - // very unsafe - TerminateThread(pair.second.native_handle(), 0); - pair.second.detach(); - } - } LL_DEBUGS("Window") << "thread pool shutdown complete" << LL_ENDL; return true; } |