cancel
Stop function running in the background
Syntax
Description
cancel( stops each queued or running
element of the F)Future array F.
For each element of F that does not have the
State property 'finished',
cancel sets the State property to
'finished'. All canceled Future elements indicate
canceled execution in the Error property.
You are unable to interrupt some functions and operations by pressing Ctrl+C, such as save. When you use
parfeval or parfevalOnAll to run these
functions, cancel is unable to stop these futures. Use the
delete (Parallel Computing Toolbox) to shut down the pool and force
MATLAB® to stop any running functions and operations.
Note
Using delete with the background pool is not recommended. Use
instead cancelAll.
Examples
Input Arguments
Version History
Introduced in R2013b