Re: gtk & threads



> Hmm, to begin with : I don't understand why glib have a single global
> lock ????
> It is important to use mutexes in an intelligent way !
	This is principally, I think, because there is only one socket
connection to the X server.

> The overhead when running on single-processor platform can be avoided
> if the library can be configured for single-processor usage only.
	Please don't take this as an insult in any way, but isn't this
statement a tautology?  Isn't the question "How can we optimize for
single-processor use only and also be optimized for multi-processor use"?
	I personally like it this way, since I can group the gdk_threads
calls around sections of gdk code, and I don't have to constantly lock and
unlock the mutex while doing things.  Granted, it's not the biggest
performance hit to have 2/3 of every gtk/gdk call being a mutex function,
but it's not the most wonderful method of doing things either.

> Which is really hard - it is much preferable if the synchronization
> functions is fast.
	unfortunately I don't quite follow this.

	Btw, shouldn't this discussion be on gtk-devel@redhat.com, not on
the gnome devel list?
	-Chris

-- 
lansdoct@cs.alfred.edu
"If I had had more time I would have written a shorter letter." - Pascal
Linux Programs: http://cs.alfred.edu/~lansdoct/linux/
Linux - Get there. Today.
Evil Overlord Quote of the Day:
12. One of my advisors will be an average five-year-old child. Any flaws 
in my plan that he is able to spot will be corrected before implementation.




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