Re: gtk & threads
- From: Stefan Skoglund <stetson ebox tninet se>
- To: gnome-devel-list gnome org
- Subject: Re: gtk & threads
- Date: Fri, 03 Sep 1999 18:30:55 +0200
Tom Gilbert wrote:
> > Just a question. Is it necessary to directly modify gtk/gdk/glib to
> > add threading support to them? I have no experience with using
> > threads, so I don't know for sure, but can't this be done with macros
> > or small functions that wrap around the functions in the libraries?
> > The wrappers would handle thread locking and call the library function
> > to do the actual work.
> Probably doable, I'd say, but its still not a really clean way of
> handling it IMO. I don't know enough to suggest an ideal solution, but
> for now, I reckon I'd use the existing functions, and to define a couple
> of macros:
>
> START_THREAD_STUFF
> call some gtk/gtk funtions
> END_THREAD_STUFF
>
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 !
The overhead when running on single-processor platform can be avoided
if the library can be configured for single-processor usage only.
Which is really hard - it is much preferable if the synchronization
functions is fast.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]