Linked by Thom Holwerda on Sun 9th Sep 2007 18:08 UTC, submitted by koki
BeOS & Derivatives "The primary intention of my previous article was to make it very clear why and when locking is needed in multithreaded applications. In this article, I want to present my experiences in writing a new prototype for a replacement of the document model in WonderBrush and how it is manipulated and rendered asynchronously."
Permalink for comment 269968
To read all comments associated with this story, please click here.
RE: Sounds overly complicated
by dylansmrjones on Mon 10th Sep 2007 15:40 UTC in reply to "Sounds overly complicated"
dylansmrjones
Member since:
2005-10-02

Single-threaded apps are a monstrosity on the Desktop. The downside of single-threaded applications (or even single-threaded updating of the GUI) can clearly be seen in Windows, where such behaviour is very common.

Single-threaded behaviour results in this: On Windows XP, you can't even move a window on screen if it's single threaded application blocks on something. (Quoting from the article). Of course there is a work-around here (very good on multicore systems). You can under "Folder options" turn on the option to open folder windows in separate processes. And you can in the registry turn on an option to run the Desktop in a separate process.

A typical application window in Windows goes white under heavy load or under a longer process (liking unpacking an archive) because unpacking happens in the same thread as the GUI-updating.

Summasummarum: Either you use extra processes or you use multiple threads. Never ever code single-threaded. Bad habit. Bad bad habit.

Reply Parent Score: 4