by lmm · 11y ago · 0 comments
So why isn't the computer doing it for me? I'd happily sacrifice some performance if I could just write the change I wanted to make in the thread where I wanted to make it, and have the computer take care of the bookkeeping.
Or start the long-running computation from the UI code in a way that returns a promise, and chain the UI update on it, in a way that causes that continuation to be scheduled on the UI thread.
Or have an UI that can be updated from any thread (but not simultaneously) and take the big UI lock.
An astute observer will also note that at the bottom of every Win32 program is a message loop monitoring events such as for when the window is closed.
C++ programmer detected? ;)