Re: Gtk+ and multithreating

2007-05-18 Thread Michelle Konzack
Am 2007-05-16 21:32:39, schrieb Chris Vine: > The documentation is here: > > http://developer.gnome.org/doc/API/2.0/glib/glib-The-Main-Event-Loop.html#g-idle-add I have the full documentation installed and I have a hardcopy of the PDF. > The idea is that you call g_idle_add() in your worker thre

Re: Gtk+ and multithreating

2007-05-17 Thread Leonel Freire
I'm doing a multithreading program using GTK+ (a POS emulator) and I'm using something like that: // #include gpointer cb_t1(gpointer d) { while (1) { g_usleep(1000 * 2000);

Re: Gtk+ and multithreating

2007-05-16 Thread Michael L Torrie
On Wed, 2007-05-16 at 23:22 +0100, Chris Vine wrote: > > And you would need to put the "Hello" argument on the heap, and free it > in the wrapper function, because otherwise it will go out of scope > before the idle handler is called. (Sigh). Use g_strdup() to create the > string on the heap. Si

Re: Gtk+ and multithreating

2007-05-16 Thread Chris Vine
On Wed, 2007-05-16 at 21:38 +0100, Chris Vine wrote: > On Wed, 2007-05-16 at 21:32 +0100, Chris Vine wrote: > > On Wed, 2007-05-16 at 16:44 +0200, Michelle Konzack wrote: > > > Am 2007-05-14 22:22:34, schrieb Chris Vine: > > > > Pass the callbacks representing the events concerned to the main progr

Re: Gtk+ and multithreating

2007-05-16 Thread Chris Vine
On Wed, 2007-05-16 at 21:32 +0100, Chris Vine wrote: > On Wed, 2007-05-16 at 16:44 +0200, Michelle Konzack wrote: > > Am 2007-05-14 22:22:34, schrieb Chris Vine: > > > Pass the callbacks representing the events concerned to the main program > > > loop using g_idle_add(). Make sure the callbacks re

Re: Gtk+ and multithreating

2007-05-16 Thread Chris Vine
On Wed, 2007-05-16 at 16:44 +0200, Michelle Konzack wrote: > Am 2007-05-14 22:22:34, schrieb Chris Vine: > > Pass the callbacks representing the events concerned to the main program > > loop using g_idle_add(). Make sure the callbacks return FALSE. > > g_idle_add() is thread safe, provided that yo

Re: Gtk+ and multithreating

2007-05-16 Thread Michelle Konzack
Am 2007-05-14 22:22:34, schrieb Chris Vine: > Pass the callbacks representing the events concerned to the main program > loop using g_idle_add(). Make sure the callbacks return FALSE. > g_idle_add() is thread safe, provided that you have initialised glib > with g_thread_init(). > > Chris

Re: Gtk+ and multithreating

2007-05-16 Thread Michelle Konzack
Am 2007-05-15 11:28:45, schrieb chabayo: > Hi list,... > > ...im sorry if i missunderstand something... Maybe :-) > Am 14.05.2007 19:53:44 schrieb(en) Michelle Konzack: > >8< > >window_main=create_window_main(); > > > >while ( TRUE ) > >

Re: Gtk+ and multithreating

2007-05-16 Thread Michelle Konzack
Am 2007-05-14 20:56:05, schrieb Cédric Lucantis: > Michael is probably right, but to answer your question there's a good > documentation about that in the GLib manual. See the > sections 'Threads', 'Thread Pools' and 'Asynchronous Queues' under 'Glib Core > Application Support'. If you want to k

AW: Gtk+ and multithreating

2007-05-15 Thread chabayo
Hi list,... ...im sorry if i missunderstand something... Am 14.05.2007 19:53:44 schrieb(en) Michelle Konzack: Hello *, I am new on this list, but have already codes some VERY simple admin GUI's... Now I have a bigger problem/Application which need definitiv multithreading since it must poll s

Re: Gtk+ and multithreating

2007-05-14 Thread Chris Vine
On Mon, 2007-05-14 at 19:53 +0200, Michelle Konzack wrote: > Hello *, > > I am new on this list, but have already codes some VERY simple admin > GUI's... Now I have a bigger problem/Application which need definitiv > multithreading since it must poll several servers and update several > TreeView

Re: Gtk+ and multithreating

2007-05-14 Thread Cédric Lucantis
Le lundi 14 mai 2007 20:20, Michael Ekstrand a écrit : > On Mon, 2007-05-14 at 19:53 +0200, Michelle Konzack wrote: > > So, can anyone provide me with a Tutorial HOW TO MULTITHREAD those > > functions ? > > > > And maybe some other tips... > > Can you do everything asynchronously? Initiate your c

Re: Gtk+ and multithreating

2007-05-14 Thread Michael Ekstrand
On Mon, 2007-05-14 at 19:53 +0200, Michelle Konzack wrote: > So, can anyone provide me with a Tutorial HOW TO MULTITHREAD those > functions ? > > And maybe some other tips... Can you do everything asynchronously? Initiate your connections, and set up some GIOChannels to watch for data availabil

Gtk+ and multithreating

2007-05-14 Thread Michelle Konzack
Hello *, I am new on this list, but have already codes some VERY simple admin GUI's... Now I have a bigger problem/Application which need definitiv multithreading since it must poll several servers and update several TreeView and ListView. I have no experience with it, since I am one of those