Skip to main content

bugs - Why doesn't 'Abort evaluation' properly work when NotebookEvaluate is executed?


The following procedure can be easily aborted using Evaluation > Abort Evaluation menu item:


Do[j + k, {j, 1, 10000}, {k, 1, 10000}]

But it is not possible if NotebookEvaluate was used:



nb = CreateDocument[ ExpressionCell[Defer[Plot[Sin[x], {x, 0, 2 Pi}]], "Input"]]
NotebookEvaluate[nb, InsertResults -> True];

Now run this again:


Do[j+k,{j,1,10000},{k,1,10000}]

and try to abort. It does not work and the loop is on.


Anyone knows why? Is there any alternative to NotebookEvaluate?




Comments