gtk app with threads
- From: "Cristóvão B. B. Dalla Costa" <cbraga fs inf br>
- To: gtk-perl-list gnome org
- Subject: gtk app with threads
- Date: Thu, 13 May 2004 17:01:13 -0300
Hello
I'm creating an application which will download several large files.
I've setup a progress bar to display during the download and I wish to
keep it updated and not freeze the app display. I suppose threads are
the obvious choice and I've created a separate thread to download the
packages.
I suppose that I shouldn't mess with widgets from the second thread
since I've already caused several errors to come up working that way and
I'm currently attempting to install an idle handler on the main thread
to update the display.
Problem is, the idle thread doesn't ever get called. I'm creating it as
such:
Glib->idle_add (sub { $self->update_progress (\$downloaded) });
Where $downloaded is a shared variable.
Does anyone here have experience with this type of problem? How would
you recommend solving this particular design problem?
Thanks in advance,
Cristovao Dalla Costa.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]