Re: Calling gnome_url_show from a threaded program

Jeff Maki <jeffmaki home com> writes:
> I have a threaded program that has an endless thread which calls other
> threads on demand.
> I wanted to have one of my help menu options bring up my project's
> webpage. I tried to use gnome_url_show(), but it segfaults.
> How would I call gnome_url_show() from a threaded program without using
> sephamores to block all threads? Is it possible?

gnome-libs isn't threadsafe at all (GTK+ isn't really either, but it
does provide the global lock manipulated with
gdk_threads_enter()/gdk_threads_leave(); gnome-libs doesn't use this
lock). Anyway basically only one thread can use gnome-libs as far as I

The easiest workaround is probably to queue an idle handler that shows
the URL, since you can queue an idle handler from any thread. Have the
idle handler return FALSE so that it runs only one time.


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