Maybe not exactly to the called routine, but you can report progress to, say, the instance that invoked the called method, or to some other part of your code. I think this is probably what you meant anyway, since the next execution point of the calling
method is sitting in the call stack, waiting for a return.
Pass a reference to a "listener" class to the call; as a simple example, perhaps you have a class called ProgressListener, implementing the method reportProgress(
String progressString). The listener could be the same class as has the long-running call, and you could pass
this as the instance you want to receive the progress reports.
Then have the called routine call reportProgress() with whatever string it wants the caller to know about.
This will work if all you are going to do is, say, display the string in the console while your code grinds away. Things can get much more elaborate if you want to estimate percentage of task done, or whatever. A String is a fairly crude way of reporting progress, is all I'm saying. And of course if THAT were all you wanted to do, the long-running method could do it itself.
But the fact that the caller and callee are in the same thread needn't keep you from using a listener.
Now, if you DO have a GUI, say in Swing, there may be restrictions about what you can or should do in a long-running calculation thread. Those considerations depend on whether you have a UI and which one you have, so I/we can't specify them here.
rc