Streen has asked for the wisdom of the Perl Monks concerning the following question:
I know the "printStatus" sub is an endless loop, but this is not the problem. The problem is, when i call the thread, the sub defined in the thread is called, the "printStatus" sub is also called, but only once.sub run { #this is called via a button from the GUI #Call the Module $threadRun = Thread -> new (\&printExcel::Edit, $option,$path); #print the status &printStatus(); } sub printStatus { print "\n\n\n\n\n\nprint status\n"; #hier hol ich mir den neuen status my @NewStatus = &printExcel::GetStatus(); print "new status: @NewStatus\n"; #now wait 5 seconds an call yourself $Basic_wd -> after (5000, &printStatus(@NewStatus)); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl/Tk and Threads
by gri6507 (Deacon) on Jun 17, 2004 at 13:24 UTC | |
|
Re: Perl/Tk and Threads
by zentara (Cardinal) on Jun 17, 2004 at 14:37 UTC |