parfeval
Description
schedules the function F = parfeval(backgroundPool,fcn,numFcnOut,X1,...,Xm)fcn to run in the background. You can run other
code while MATLAB® is running the function fcn.
To run a function on a parallel pool, see parfeval (Parallel Computing Toolbox).
parfeval runs the function fcn on a
background worker. For more information about workers and the background, see Background Workers.
MATLAB asynchronously evaluates the function fcn on each worker
with X1,X2,…,Xm input
arguments and returns numFcnOut output arguments.
MATLAB returns the Future object F before the
function fcn finishes running. You can use fetchOutputs to
retrieve the results from the future. To stop running the function fcn,
use the cancel
function. For more information about futures, see Future.
schedules the function F = parfeval(fcn,numFcnOut,X1,...,Xm)fcn to be run.
MATLAB returns the Future object F before the
function fcn finishes running.
Use this syntax in code designed for use with Parallel Computing Toolbox™.
If you do not have Parallel Computing Toolbox, you do not use any parallel resources. The function runs in serial.
If you have Parallel Computing Toolbox,
parfevalautomatically uses parallel resources.
Examples
Input Arguments
Output Arguments
Extended Capabilities
Version History
Introduced in R2021b
See Also
backgroundPool | parfeval (Parallel Computing Toolbox) | cancel | afterEach | afterAll | fetchNext | fetchOutputs | wait | Future