Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: User Feedback for Subroutines with Long Execution Time

by Notromda (Pilgrim)
on May 29, 2003 at 22:27 UTC ( #261709=note: print w/replies, xml ) Need Help??


in reply to Re: User Feedback for Subroutines with Long Execution Time
in thread User Feedback for Subroutines with Long Execution Time

For those not familiar with graphical interfaces, this is often called a "callback". In any case, one must assume that your long running process has a way of knowing how far along it is, and you'll have to have various points in the process explicitly call the callback with the current status report.
sub statusPrint { # code to update status print shift; } sub longprocess { my &status = shift; #do stuff &status("10%"); #more stuff &status("20%"); } call it with: longprocess (\&statusPrint);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://261709]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2019-07-17 02:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?