On Mon Jul 11 11:16:20 2022 +0000, Alistair Leslie-Hughes wrote:
This really shouldn't be a loop. Though more work, it should be a thread with events to detect when the notification(s) have occurred.
What is the problem if it is a loop in the same thread?
I'd agree with you if this was a real program that mustn't block the main thread to keep the application responsive, but here the main thread is going to wait for the notification anyway, so I don't understand what would be the advantage of offloading `DoWork()` to another thread.