Is there a way to check programmatically whether the FrontEnd considers evaluation still running? Or even better: is there a way to check whether the FrontEnd has some pending inputs to be sent to the kernel?
P.S. This question has arisen from previous question.
EDIT
When evaluating a Cell in the FrontEnd we usually create a queue of inputs for the kernel.
I need a function that will return True
if the FrontEnd has sent to the kernel the last input of the queue of inputs from the EvaluationNotebook[]
. Or in other words I need a function that returns True
if this current input is the last input of the queue of inputs generated by the FrontEnd.
This should work. Of course, you have to run it in a different kernel than the one that is performing the evaluation you want to check for.
Obviously, it's best to set things up before hand using a tool like
Monitor
. For example,will allow you to observe the progress of the index variable
i
. If you haven't set things up before hand, you might be able to do something using the "Interrupt Evaluation" button under the Evaluation menu. For example, try the following:Now, wait six or more seconds and then select "Interrupt Evaluation". You can then examine the state of
i
to see how far along it is. You resume evaluation using Continue under "Debugger Controls".