in reply to User Feedback for Subroutines with Long Execution Time

I want the script that actually calls the method to control the progress bar

That could be interesting to do, if the parent script is simply sitting waiting for the long-running sub to return.

One way to achieve something like this would be to set up pipes, and fork to execute the 30-minute subroutine. That way, it can return data about its progress to the parent process, which can then display it to the user.

This seems like overkill, though, for what seems a fairly simple problem. It'd probably be easiest (to implement) to have the long sub directly write to the console.

Maybe you could do something with threads to allow the parent script to continue to update the progress bar while the long-running sub is executing?

Hope that helps .. just a few ideas really.

-- Foxcub
#include www.liquidfusion.org.uk