Self-restarting MathKernel - is it possible in Mathematica?

前端 未结 6 1277
慢半拍i
慢半拍i 2021-02-01 10:06

This question comes from the recent question \"Correct way to cap Mathematica memory use?\"

I wonder, is it possible to programmatically restart MathKernel keeping the c

6条回答
  •  猫巷女王i
    2021-02-01 11:04

    From a comment by Arnoud Buzing yesterday, on Stack Exchange Mathematica chat, quoting entirely:

    In a notebook, if you have multiple cells you can put Quit in a cell by itself and set this option:

    SetOptions[$FrontEnd, "ClearEvaluationQueueOnKernelQuit" -> False]
    

    Then if you have a cell above it and below it and select all three and evaluate, the kernel will Quit but the frontend evaluation queue will continue (and restart the kernel for the last cell).

    -- Arnoud Buzing

提交回复
热议问题