matlab::engine::runMacLoopInProcess
Description
int runMacLoopInProcess(std::function<int(int, char*[])> func, int argc,
char *argv[], const std::vector<std::u16string>& options =
std::vector<std::u16string>())
Use runMacLoopInProcess to run MATLAB® on Mac platforms when you start MATLAB and the C++ engine in the same process using the
MATLABApplicationMode::IN_PROCESS mode of matlab::engine::startMATLAB or matlab::engine::startMATLABAsync. On
Mac platforms, in-process mode requires MATLAB to run on the main thread of the process.
runMacLoopInProcess starts MATLAB on this main thread and runs your application logic on a secondary
thread.
Include
Namespace: | matlab::engine |
| Include | MatlabEngine.hpp |
Parameters
| Function containing your application logic, including the call
to
|
| Number of command-line arguments. Copy this argument from the
|
| Command-line arguments array. Copy this argument from the
|
| (Optional) MATLAB startup options.
|
Return Value
| The return value of |
Exceptions
| You call |
Examples
Version History
Introduced in R2026a