Felix Nawothnig felix.nawothnig@t-online.de writes:
(The numbers slightly differ between runs for obvious reasons but they are close enough (with an error margin of +/- 10 we could maybe make this a real testcase))
So, PeekMessage always yields execution (it shouldn't) with PM_NOYIELD specified it yields execution twice (although it shouldn't at all).
PeekMessage is going to call the server and wait on the result, there's no way around it. The extra yield is to avoid hammering the server with requests in stupid apps that constantly poll for messages, since a server call is much more expensive than a Windows system call.
This could certainly be changed, but it will require evidence that the changes help for common real cases, not just to make some artificial benchmark show better results.