Re: multithreaded gtk app
- From: "Ardhan Madras" <ajhwb knac com>
- To: "Manu TM" <manutm007 gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: multithreaded gtk app
- Date: Sun, 24 Jan 2010 07:31:22 -0800
Hi,
I rare to use GDK locks method on another thread, as it's described in GTK+ FAQ that X server receive command
in batch mode, that's means command or request will not be send immediately, if you do GTK+ call on another
thread except the main thread, GTK+ will now know how to send that command out. You many want to see
http://library.gnome.org/devel/gtk-faq/stable/x491.html
For GTK+ call in another thread, if possible I will try to use some of these function in that thread (rather
than using locking/unlocking and flush semantics that very complicated), they do their job in the main loop
that is the main thread, they are as you may already know:
g_timeout_add(), g_timeout_add_full(), g_idle_add(), g_idle_add_full(), etc.
Notice that GLib main loop functions are all thread safe.
- Ardhan
_____________________________________________________________
Listen to KNAC, Hit the Home page and Tune In Live! ---> http://www.knac.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]