Re: GNU-Pth and GLIB



I claim that the majority of glib users will not benefit from a threading
API. First of all, Gtk-based GUI apps have NO business running in more than
one thread - there are just too many ways to screw yourself up. (need to do
stuff like async DNS lookups? fork another process. Network I/O? multiplexed
non-blocking is the answer)... Second, anyone planning to use glib in a
high-performance server will know enough about what they're doing to make an
appropriate choice of concurrency technique. Cooperatively-scheduled threads
(and multithreading in general) are certainly useful *in some cases*, but
those cases will rarely intersect the typical uses of glib/Gtk.

> In an event driven server application it can be usefull to have a
> non-preemtive thread implementation. I found it easier to keep data
> consistent because no locking of data is needed.

I'd suggest using a library like State Threads, which was designed
especially for this purpose:
http://oss.sgi.com/projects/state-threads/


Dan





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]