ole: Optimisation for COM Calls.
Add an optimisation to yield and try to allow the RPC to run before waiting for messages and RPCs to arrive.
This commit is contained in:
parent
30a90e1842
commit
b3041ba6ad
|
@ -290,7 +290,10 @@ static HRESULT WINAPI RpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER iface, RPC
|
|||
if (apt) apartment_release(apt);
|
||||
|
||||
if (hr == S_OK)
|
||||
hr = CoWaitForMultipleHandles(0, INFINITE, 1, ¶ms->handle, &index);
|
||||
{
|
||||
if (WaitForSingleObject(params->handle, 0))
|
||||
hr = CoWaitForMultipleHandles(0, INFINITE, 1, ¶ms->handle, &index);
|
||||
}
|
||||
CloseHandle(params->handle);
|
||||
|
||||
if (hr == S_OK) hr = params->hr;
|
||||
|
|
Loading…
Reference in New Issue