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:
Robert Shearman 2006-01-14 17:45:49 +01:00 committed by Alexandre Julliard
parent 30a90e1842
commit b3041ba6ad
1 changed files with 4 additions and 1 deletions

View File

@ -290,7 +290,10 @@ static HRESULT WINAPI RpcChannelBuffer_SendReceive(LPRPCCHANNELBUFFER iface, RPC
if (apt) apartment_release(apt); if (apt) apartment_release(apt);
if (hr == S_OK) 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); CloseHandle(params->handle);
if (hr == S_OK) hr = params->hr; if (hr == S_OK) hr = params->hr;