There will be times when you want to stop the Wolfram System in the middle of a computation. You may have asked the Wolfram System to do something that you did not intend or that is taking too much time. The Wolfram System provides several convenient ways to stop computations, including menu items and commands that you can use in your programs.
The menu items to stop or pause computations can be accessed from the Evaluation menu:
This Do loop sequentially prints each integer from 1 to 1000, pausing for half a second at each step. It takes over ten minutes to finish:
The Wolfram System then outputs $Aborted:
If Abort Evaluation does not succeed in stopping the computation, you can do so by quitting the active kernel.
This stops all computations in the selected kernel. However, by quitting the kernel you will lose the results from your session, including definitions of variables and functions and output from computations. You should therefore use this with caution.
You must have a kernel running to perform computations. If you quit your only running kernel, you must start one again. To do this, simply evaluate any expression in a notebook, or select a kernel to start in the Evaluation ▶ Start Kernel menu.
To remove a cell from this evaluation queue, first select its bracket. Here, the queued cell is selected while the Do loop continues to run:
You can also stop a computation by using Abort as part of a Wolfram Language expression.