Common wisdom is to construct a game's message pump as some flavor of this:
MSG msg = { 0 };
while(msg.message != WM_QUIT)
{
if(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
else
{
Update();
}
}Does this still make sense with modern multi-threaded engine design? Might it not be better to use GetMessage instead of PeekMessage, which blocks until a message is received, and let a separate thread(s) handle all the game logic/rendering? Then the actual window handling can't get hung up by the rendering, and the rendering doesn't get potentially hiccuped by windows events…