News for hackers. Stuff that matters.
Re:Multithreaded toolkits: A failed dream? (2004) by kllrnohj on Monday November 02, 2015 @10:27AM (#10492264)
One of the things the article doesn't mention, which is odd, is that frames are precious objects that need to be produced in whole. If you have multiple threads all producing parts of the scene, when do you actually kick off the frame so that the user never sees a part of a frame? Even if your worker thread is just updating the text of a few fields when it's done, you need to batch that up into a single atomic update on the screen.

Which means you need transactions, at which point you basically have a single thread and a message queue so why complicate things internally and add all the lock/unlock overhead?

Re:Multithreaded toolkits: A failed dream? (2004) by kragen on Monday November 02, 2015 @11:09AM (#10492612)
Most GUI toolkits don't bother. I'm guessing you work in video games?
Re:Multithreaded toolkits: A failed dream? (2004) by kllrnohj on Monday November 02, 2015 @08:56PM (#10496855)
Every GUI toolkit already "bothers" by virtue of being single threaded. You never see a UI toolkit where this:

  btn.setText("hello")
  btn.setColor(BLACK)
might show a white-text "hello" for a single frame. If the UI toolkit was thread-safe, though, that would become a possibility.