Changeset 36047 in vbox for trunk/src/VBox
- Timestamp:
- Feb 21, 2011 10:32:25 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_init.c
r33540 r36047 407 407 if (render_spu.dwWinThreadId) 408 408 { 409 PostThreadMessage(render_spu.dwWinThreadId, WM_QUIT, 0, 0); 410 WaitForSingleObject(render_spu.hWinThreadReadyEvent, INFINITE); 409 HANDLE hNative; 410 411 hNative = OpenThread(SYNCHRONIZE|THREAD_QUERY_INFORMATION|THREAD_TERMINATE, 412 false, render_spu.dwWinThreadId); 413 if (!hNative) 414 { 415 crWarning("Failed to get handle for window thread(%#x)", GetLastError()); 416 } 417 418 if (PostThreadMessage(render_spu.dwWinThreadId, WM_QUIT, 0, 0)) 419 { 420 WaitForSingleObject(render_spu.hWinThreadReadyEvent, INFINITE); 421 422 /*wait for os thread to actually finish*/ 423 if (hNative && WaitForSingleObject(hNative, 3000)==WAIT_TIMEOUT) 424 { 425 crDebug("Wait failed, terminating"); 426 if (!TerminateThread(hNative, 1)) 427 { 428 crWarning("TerminateThread failed"); 429 } 430 } 431 } 432 433 if (hNative) 434 { 435 CloseHandle(hNative); 436 } 411 437 } 412 438 CloseHandle(render_spu.hWinThreadReadyEvent);
Note:
See TracChangeset
for help on using the changeset viewer.