Commit b3041ba6 authored by Robert Shearman's avatar Robert Shearman Committed by Alexandre Julliard

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.
parent 30a90e18
......@@ -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, &params->handle, &index);
{
if (WaitForSingleObject(params->handle, 0))
hr = CoWaitForMultipleHandles(0, INFINITE, 1, &params->handle, &index);
}
CloseHandle(params->handle);
if (hr == S_OK) hr = params->hr;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment