Alexandre Julliard (@julliard) commented about dlls/win32u/message.c:
if (res) {
free( buffer );
if (buffer != buffer_init) free( buffer ); if (res == STATUS_PENDING) {
NtYieldExecution();
I think this should be up to the caller. It's not useful to yield if we are going to wait anyway.