Re: Update Progressbar using SIGALRM fails. Are there alternatives?
- From: "Michael Rothwell" <rothwell m-4 info>
- To: "R. Lahaye" <lahaye users sourceforge net>, <gtk-app-devel-list gnome org>
- Subject: Re: Update Progressbar using SIGALRM fails. Are there alternatives?
- Date: Wed, 9 Jan 2002 09:24:49 -0500
From: "R. Lahaye" <lahaye users sourceforge net>
I want to use the activity-progressbar to indicate
the activity of a time-consuming function call.
You'll have to run the "time-consuming function" in a separate thread or
process.
PS: I'm not at all familiar with fork(), but could that provide
a solution? Having a child process with an alarm set to 500 millisec?
Don't run the big function in the main process. Update the progress bar in
the main process. Run the function in a child process. You could have the
child process talk to the main process over a pipe, giving he main process
updates. You can use the G_IO functions to read the pipe. It might be better
to use a thread, though.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]