1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-24 04:04:31 +00:00

1. Fixed thread HANDLE leak on Windows KVM

2. Swapped semaphore with spin lock on certain objects
This commit is contained in:
Bryan Roe
2020-11-30 17:20:22 -08:00
parent 78c553d3ad
commit 8a5610c2d8
7 changed files with 164 additions and 231 deletions

View File

@@ -239,7 +239,8 @@ void KVM_StopMessagePump()
if (CUR_HWND != NULL)
{
PostMessageA(CUR_HWND, WM_QUIT, 0, 0);
WaitForSingleObject(CUR_WORKTHREAD, 5000);
if (WaitForSingleObject(CUR_WORKTHREAD, 5000) == 0) { CloseHandle(CUR_WORKTHREAD); CUR_WORKTHREAD = NULL; }
if (CUR_APCTHREAD != NULL) { CloseHandle(CUR_APCTHREAD); CUR_APCTHREAD = NULL; }
}
}