Re:Multithreaded toolkits: A failed dream? (2004)
by devit on Monday November 02, 2015 @05:22AM
(#10491010)
You can just send a closure to the UI thread and have it executed there, provided you are using a good enough programming language.
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.
Re:Multithreaded toolkits: A failed dream? (2004)
by frozenport on Monday November 02, 2015 @02:22PM
(#10494373)
In modern frameworks like Qt the message loop is mostly hidden.
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.
Re:Multithreaded toolkits: A failed dream? (2004)
by vesinisa on Monday November 02, 2015 @05:27AM
(#10491020)
> it's exceedingly tedious to program.
C++ programmer detected? ;)
Re:Multithreaded toolkits: A failed dream? (2004)
by lallysingh on Monday November 02, 2015 @08:28AM
(#10491675)
Just have the ability to send closures (std::function) to other threads' message queues. Then you can use inline lambda syntax.
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.