Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

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

by Notromda (Pilgrim)
on May 29, 2003 at 22:27 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://261709]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2024-03-28 17:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found