afterAll
Run function after all functions finish running in the background
Description
returns a B = afterAll(A,fcn,n)Future object B and runs the
function fcn automatically after all elements in the
Future array A finish.
MATLAB® runs the function fcn using the concatenated
outputs from each element in A. The outputs
Y1,...,Ym from each Future object are
concatenated vertically, in linear index order. For example, if
A is a two-element Future vector with
outputs y1 and y2 from the first and second
Future objects respectively, MATLAB runs fcn([y1; y2]) after all elements in
A finish.
If the Future array A has
M elements, MATLAB runs the function only once. When the scheduled function
fcn finishes, the Future object
B finishes.
You create a Future object when:
You run a function in the background using
backgroundPool.You run a function on a parallel pool when you have Parallel Computing Toolbox™.
For more information about using
afterAllon a parallel pool, see Use afterEach and afterAll to Run Callback Functions (Parallel Computing Toolbox).
If any of the elements in A encounters an error,
afterAll finishes with an error.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2018a


