There is a test for it and it takes about ten seconds. Has anything new arrived in the last twenty minutes? A fact, an angle, a consideration you did not already have?
If not, the thinking finished a while ago and what is running now is the rerun. Reruns feel productive because they use the same muscles. Same furrowed concentration, same sense of tackling something difficult. The only difference is that nothing at the end of it is any different from what was there at the start.