How can I programmatically check from a preemptive evaluation whether a main evaluation is currently ongoing?
I need a function mainEvaluationOngoingQ[] so that
Button["Evaluating?", Print@mainEvaluationOngoingQ[], Method -> "Preemptive"]
will print True only if a main evaluation is ongoing.
Method->"Queued". Any way to cover those cases too? – Rojo Feb 09 '12 at 17:58withMainEvaluation. If not, one can probably write code which would pre-process a notebook and change that at the box level. Other than that, I don't know how to do this - this may need some lower-level stuff. – Leonid Shifrin Feb 09 '12 at 18:11Method->"Queued", the evaluation is queued to be evaluated using the main link, so there by definition isn't a (-nother) main evaluation running, andmainEvaluationOngoingalways returnsFalse, which is correct when interpreted as "is another main evaluation ongoing". Or am I missing something? – Albert Retey May 22 '13 at 14:05