From 3091aa5302a60e1efc6518b3205dca5d4b7a7b02 Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Wed, 29 Mar 2006 18:38:21 +0100 Subject: [PATCH] ole32: Pass the no yield flag to PeekMessage. Pass the no yield flag to PeekMessage since we sleep in MsgWaitForMultipleObjectsEx and the extra context switch is wasteful. --- dlls/ole32/compobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ole32/compobj.c b/dlls/ole32/compobj.c index 7057450007c..2528b619983 100644 --- a/dlls/ole32/compobj.c +++ b/dlls/ole32/compobj.c @@ -2703,7 +2703,7 @@ HRESULT WINAPI CoWaitForMultipleHandles(DWORD dwFlags, DWORD dwTimeout, if (res == WAIT_OBJECT_0 + cHandles) /* messages available */ { MSG msg; - while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) + while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE|PM_NOYIELD)) { /* FIXME: filter the messages here */ TRACE("received message whilst waiting for RPC: 0x%04x\n", msg.message);