Fixed some deadlock(s) in message sending.
This commit is contained in:
parent
b068320abd
commit
8c38f45a7e
|
@ -701,8 +701,19 @@ int QUEUE_WaitBits( WORD bits, DWORD timeout )
|
||||||
|
|
||||||
if ( !THREAD_IsWin16( THREAD_Current() ) )
|
if ( !THREAD_IsWin16( THREAD_Current() ) )
|
||||||
{
|
{
|
||||||
/* win32 thread, use WaitForMultipleObjects */
|
BOOL bHasWin16Lock;
|
||||||
MsgWaitForMultipleObjects( 0, NULL, FALSE, timeout, queue->wakeMask );
|
DWORD dwlc;
|
||||||
|
|
||||||
|
if ( (bHasWin16Lock = _ConfirmWin16Lock()) )
|
||||||
|
{
|
||||||
|
TRACE_(msg)("bHasWin16Lock=TRUE\n");
|
||||||
|
ReleaseThunkLock( &dwlc );
|
||||||
|
}
|
||||||
|
WaitForSingleObject( queue->hEvent, timeout );
|
||||||
|
if ( bHasWin16Lock )
|
||||||
|
{
|
||||||
|
RestoreThunkLock( dwlc );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue