PockMonk has asked for the wisdom of the Perl Monks concerning the following question:
# set a shared value of TRUE for running the progress bar my $keepRunningProgressBar : shared = 1; # Set the progress bar running indefinitely my $progressBar = threads->create(sub { while ($keepRunningProgressBar + == 1) {print "<img src=\"http://www.thepaty.plus.com/dot.gif\">"; sl +eep(10);} }); $progressBar->detach; # Now do stuff in the work thread my $threadForSpidering = threads->new(\&workthread, $category, $conten +ts, $userRunningBot,$userIPAddress); #The work thread finished $threadForSpidering->join; #And tells the progress bar to stop running $keepRunningProgressBar = 0;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Progress bar with (i)threads
by MaxKlokan (Monk) on Dec 08, 2006 at 12:56 UTC | |
by PockMonk (Beadle) on Dec 08, 2006 at 13:59 UTC | |
|
Re: Progress bar with (i)threads
by gaal (Parson) on Dec 08, 2006 at 11:26 UTC | |
by PockMonk (Beadle) on Dec 08, 2006 at 11:42 UTC | |
|
Re: Progress bar with (i)threads
by clinton (Priest) on Dec 08, 2006 at 13:38 UTC | |
by PockMonk (Beadle) on Dec 08, 2006 at 14:33 UTC | |
|
Re: Progress bar with (i)threads
by zentara (Cardinal) on Dec 08, 2006 at 13:48 UTC | |
|
Re: Progress bar with (i)threads (Buffering)
by Anonymous Monk on Dec 08, 2006 at 13:49 UTC | |
by PockMonk (Beadle) on Dec 08, 2006 at 14:36 UTC |