Topic: Notes on garbage collection, reference counting, and manual storageallocation
Author: "Hans Boehm" <Hans_Boehm@hp.com>
Date: Mon, 20 Dec 2004 22:37:09 CST Raw View
Sergey P. Derevyago wrote:
> John Nagle wrote:
> > In particular, seldom is C++ GUI code written for a highly
concurrent
> > model. Arguably, it should be, but for historical reasons, most
> > GUI systems are single-thread.
> >
> Also there exist some good reasons to keep GUI single-threaded.
Please, take
> a look at "Multithreaded toolkits: A failed dream?"
> http://weblogs.java.net/blog/kgh/archive/2004/10/multithreaded_t.html
> In particular: ...
I'm not sure this is terribly relevant to this discussion. But if we
are talking about the needs for threads in general:
Isn't there an important distinction here between applications that
happen to have a GUI, and the GUI event processing per se?
I have very limited experience writing GUIs. But I concluded a long
time ago that if you want to keep a responsive GUI while running tasks
that take an unbounded amount of time, you need either
a) A separate preemptively-scheduled thread in which to run the
long-running task, or
b) Something pretty ugly involving: Polling in the long running task,
or a separate process and inter-process-communication, or ...
Mozilla is certainly multithreaded. I assume so is Internet Explorer.
Hans
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]