Run function in background
schedules the functionF
= parfeval(backgroundPool,fcn
,n
,X1,...,Xm
)fcn
在背景中运行。您可以在matlab时运行其他代码®正在运行该功能fcn
。
To run a function on a parallel pool, seeparfeval
(Parallel Computing Toolbox)。
parfeval
运行该功能fcn
on a background worker. For more information about workers and the background, seeBackground Workers。
Matlab评估该功能fcn
asynchronously as[Y1,...,Yn] = fcn(X1,...,Xm)
, withm
inputs andn
outputs.
MATLAB returns the未来
objectF
before the functionfcn
finishes running. You can usefetchOutputs
检索结果[Y1,...,Yn]
from the future. To stop running the functionfcn
, use thecancel
function. For more information about futures, see未来
。
schedules the functionF
= parfeval(fcn
,n
,X1,...,Xm
)fcn
运行。
MATLAB returns the未来
objectF
before the functionfcn
finishes running.
Use this syntax to run 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,parfeval
automatically uses parallel resources.