Re: GUI freezes waiting for callback function to return

2012-12-16 Thread Michael Torrie
On 12/15/2012 11:08 AM, Mateusz Marzantowicz wrote: Very valuable articles and blog posts. Now I know that threading in GUI apps (using GTK+) is much harder then I originally thought it is. Although my use case is very simple I must employ complicated threading machinery. I'm playing with

Re: GUI freezes waiting for callback function to return

2012-12-15 Thread Mateusz Marzantowicz
On 14.12.2012 11:03, Federico Zamperini wrote: I suggest you to read these interesting pages: http://blog.borovsak.si/2009/06/multi-threaded-gtk-applications.html http://blogs.operationaldynamics.com/andrew/software/gnome-desktop/gtk-thread-awareness Very valuable articles and blog posts.

Re: GUI freezes waiting for callback function to return

2012-12-14 Thread Federico Zamperini
I suggest you to read these interesting pages: http://blog.borovsak.si/2009/06/multi-threaded-gtk-applications.html http://blogs.operationaldynamics.com/andrew/software/gnome-desktop/gtk-thread-awareness Warning: gdk_threads_enter has been deprecated since version 3.6 and should not be used in

GUI freezes waiting for callback function to return

2012-12-13 Thread Mateusz Marzantowicz
Hello, I'm writing very simple application in Python using pygobject. I'm using Gtk.Application, Gtk.ApplicationWindow and XML menu definition which is parsed by Gtk.Builder(). I'm also using Gio.SimpleAction to call method when user clicks on menu item. What I've observed is that GUI (menu to

Re: GUI freezes waiting for callback function to return

2012-12-13 Thread jcupitt
On 13 December 2012 11:21, Mateusz Marzantowicz mmarzantow...@osdf.com.pl wrote: I'm writing very simple application in Python using pygobject. I'm using What I've observed is that GUI (menu to be specific) freezes till my callback function finishes. It's completely unacceptable for GUI This

Re: GUI freezes waiting for callback function to return

2012-12-13 Thread Perdie Perduta
In C++ I create an object in the call back and that in it's constructor registers itself to do lengthy processing during gtk idle events using: gint iTag = gtk_idle_add( GtkFunction fIdleActivity, gpointer pMyObject ); On completion, in the destructor it unregisters itself with: void

Re: GUI freezes waiting for callback function to return

2012-12-13 Thread Mateusz Marzantowicz
On 13.12.2012 14:27, Perdie Perduta wrote: In C++ I create an object in the call back and that in it's constructor registers itself to do lengthy processing during gtk idle events using: gint iTag = gtk_idle_add( GtkFunction fIdleActivity, gpointer pMyObject ); On completion, in the