title: Prevent multiple MessageBoxes on one thread without blocking
body: <p>I have registered an error handler in my application that shows a user dialog MessageBox when an unhandled exception occurs. It's connected to the Application.DispatcherUnhandledException event and thus happens on the UI thread. Now I've seen a situation where an exception is thrown regularly, once per second, and new dialogs kept popping up. I was trying to prevent this with a lock, but since it's all on the same thread, this doesn't have any effect. An additional sleep lock on the same thread obviously led to a single blocked MessageBox on the screen.</p>
  
  <p>The MessageBox seems to free the UI thread for other MessageBoxes to appear. How can I prevent that without blocking the thread?</p>
  
  <p>The user has the choice to continue or exit the application. When continuing, the next queued MessageBox should appear, it should not be discarded. If too many messages show up in a time, the user can still decide to exit the application.</p>