RE: Screen updates while long time running subroutine

Title: RE: Screen updates while long time running subroutine

I insist to use threads. If you are calling an external program you have no major problem with syncronization. If the machine has only one processor it could be better to make that system() inside a thread with less priority so your GUI will continue working without any lag.

If you wish could even use a different process where to call that program:

  if ((pid = fork()) == 0) {
    /* We're in a child process */
  if (pid < 0) err_sys("Fork error");
  /* Parent process */
  /* get back to the gtk_main() loop */

PD: About threads, take a look at:

Esteban Quijano Vincenzi
Artinsoft corp.
Phone: ++(506) 283-3144
Fax: (506) 283-2655
e-mail: equijano artinsoft com <equijano artinsoft com > 

-----Original Message-----
From: Andrej Prsa [mailto:andrej prsa guest arnes si]
Sent: Wednesday, July 18, 2001 12:29 AM
To: gtk-list gnome org
Subject: Re: Screen updates while long time running subroutine


> okay, but my earlier post ("picking up resize events") has the sizing of the drawables in terms of the gdkwindow size IN the main routine.

> so that's not much help, really ..
> Anyone???

I'm only going to rephrase the question: what would happen if you have to deal with an external binary program you call with system(), which takes long time to execute? Is there a way to update the GUI-related stuff?


gtk-list mailing list
gtk-list gnome org

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