Re: can't create and show GtkWidget in thread
- From: Sven Neumann <sven gimp org>
- To: Paul Davis <pbd Op Net>
- Cc: "Leon Tsai" <leon740727 yahoo com tw>, gtk-list gnome org
- Subject: Re: can't create and show GtkWidget in thread
- Date: 20 Sep 2001 15:50:16 +0200
Hi,
Paul Davis <pbd Op Net> writes:
> >in thread, can I? Is the gtk_widget_show a GTK+ functions? thanks
>
> "GTK+" functions are named "gtk_something".
>
> If its called
>
> gtk_*
> gdk_*
> g_*
>
> then you should consider it necessary to surround the calls to it/them
> with a lock acquisition and release. i'm not totally sure about the
> g_* functions, but i think this is true even there.
not true for glib functions. Actually you only need to guard functions
that call GDK functions. If you are not sure, you are on the safe side
by obtaining the lock for all gtk_* and gdk_* called from your threads.
glib itself is thread-safe, but of course you need to locking if two
threads access the same data structures (a GHashTable for example).
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]