title: When should I use a wait function like MsgWaitForMultipleObjects, and when shouldn't I?
body: <p>So I am trying to understand the message processing code of Unreal Engine on Windows OS, and I didn't find any frequent usage of the function MsgWaitForMultipleObjects or MsgWaitForMultipleObjectsEx in the message pumping code.
  The engine message pumping goes like this:</p>
  <pre><code>MSG Message;
  
      // standard Windows message handling
      while(PeekMessage(&amp;Message, NULL, 0, 0, PM_REMOVE))
      { 
          TranslateMessage(&amp;Message);
          DispatchMessage(&amp;Message); 
      }
  </code></pre>
  <p>For context, this code will run every frame one to three times, meaning the code will be executed each 2 - 5 milliseconds on average throughout the running time of the application. A) Does that make wait functions unnecessary? or am I missing something here!</p>
  <p>B) Is there any rough estimation of how long an application could be busy doing 'other stuff' before processing incoming messages? For instance if an application only processes messages every 50 millisecond, is that a bad practice? or is that a reasonable way of doing it? And what if the period became 500 milliseconds and so?</p>