Re: async gnome_vfs functions + gtk = possible threading problem?



On Sat, 29 Jan 2005 12:16:18 -0500
Owen Taylor <otaylor redhat com> wrote:

On Fri, 2005-01-28 at 23:19 +0100, Olivier Sessink wrote:
Hi all,

the async functions in gnome_vfs use threading. But the callback functions
from the async gnome_vfs functions, are they called from the main thread
or any additional threads? 

The real question is:

Is there a possible threading problem if I use gtk function calls in the
gnome_vfs async callbacks?

Probably not the best mailing list for this discussion...

well, on the gnome_vfs the gtk aspect is off-topic, over here the
gnome_vfs part is off-topic.. no gtk-on-gnome_vfs list yet ;-)

gnome-vfs async callbacks are called in the main thread, so making GTK+
calls from them is fine. 

(If you are using GTK+ from multiple threads with 
gdk_threads_init()/enter()/leave(), then you have to be aware tha the
callbacks are called outside the GTK+ lock. But if all your GUI is
done in the main thread, then you don't have to worry about it.)

ahh thanks, the last case indeed applies. so I'm very happy now :)

thanks,
        Olivier



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