Module: wine Branch: refs/heads/master Commit: b3041ba6ad646af8bd463a9a29196ff4bc2c2fd5 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=b3041ba6ad646af8bd463a9a...
Author: Robert Shearman rob@codeweavers.com Date: Sat Jan 14 17:45:49 2006 +0100
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.
---
dlls/ole32/rpc.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/ole32/rpc.c b/dlls/ole32/rpc.c index 58a3272..06c24d3 100644 --- a/dlls/ole32/rpc.c +++ b/dlls/ole32/rpc.c @@ -290,7 +290,10 @@ static HRESULT WINAPI RpcChannelBuffer_S 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;