matlab::engine::FutureResult
Retrieve result from asynchronous operation
Description
A future result is an object that you can use to retrieve the result of MATLAB® functions or statements. The FutureResult
class
provides all member functions of the C++ std::future
class.
Class Details
Namespace: | matlab::engine |
Include | MatlabEngine.hpp |
Constructor Summary
Create a FutureResult
object using these asynchronous functions:
Asynchronous member functions defined by
matlab::engine::MATLABEngine
.matlab::engine::startMATLABAsync
,matlab::engine::connectMATLABAsync
, andmatlab::engine::findMATLABAsync
.
Method Summary
Member Functions
Cancel the operation held by the |
Member Functions Delegated to std::future |
---|
|
get
Method
| Cannot start or connect to MATLAB session. |
| Execution of command is canceled. |
| Evaluation of command is interrupted. |
| The MATLAB session is not available. |
| There is a syntax error in the MATLAB function. |
| MATLAB run-time error in the function. |
| The result from a MATLAB function cannot be converted to the specified type. |
Method Details
cancel
bool FutureResult::cancel(bool allowInterrupt = true);
Cancel the evaluation of the MATLAB function or statement. You cannot cancel asynchronous operations
that use: matlab::engine::startMATLABAsync
,
matlab::engine::connectMATLABAsync
, or
matlab::engine::findMATLABAsync
.
|
If false, do not interrupt if execution had already begun. |
| Was command canceled if execution had already begun. |
bool flag = future.cancel();
No exceptions thrown
Version History
Introduced in R2017b