Re: gtk_timeout_add / SIGALRM with gtk



Hello Tristan,

Many thanks on getting back to me..

On Tue, 2004-05-25 at 15:52, Tristan Van Berkom wrote:
Colin Thomas wrote:
Hello.

I am developing an application which is basically a lots of buttons, no
drawing areas. When one button is depressed, the application runs a
compute intensive job for 20 minutes. While this is happening though the
main screen does not refresh, and slowly becomes obiterated.

You have two solutions to consider:
     A.) Modify your "compute intensive job" so that it can be identified
         in short itterations that either AA) return to the main loop
         or AB) gtk_main_iteration(); (i.e. nest the main loop)

     B.) If this "compute intensive job" is a single function call from
         a third party then you will have to run it in a thread (which
         can be alot more complicated then solution A).

The compute intensive code is a single piece of code (which I wrote),
and is shared with some command line apps, so is difficult to break into
short pieces and insert specific gtk stuff into. It would appear then
that threading would seem to be the solution. Todd Fisher has send an
example of using gthreads, and I will have a look at it this morning.

Best regards

Colin Thomas


Cheers,
                              -Tristan

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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