prodserver.addon.FevalFuture
R2026bDescription
An FevalFuture object represents a function that you have
scheduled to run on MATLAB®
Production Server™.
Creation
Create an FevalFuture object using the prodserver.addon.asyncfeval
function.
Properties
This property is read-only.
Date and time when the FevalFuture object was created, returned as
a datetime scalar.
This property is read-only.
Date and time at which the FevalFuture object was deleted from the
server, returned as a datetime scalar.
This property is read-only.
Error information, returned as a scalar or cell array of MException
objects. If the FevalFuture object completes with no error, this
property is empty.
This property is read-only.
Date and time when the function finished, returned as a datetime
scalar.
The FevalFuture object finishes running when MATLAB finishes running the function associated with it.
If the function associated with the FevalFuture object is not
finished running, this property is an empty datetime array.
This property is read-only.
Function associated with the FevalFuture object, returned as a
string scalar.
Host name of the MATLAB
Production Server instance hosting the deployable archive that created the
FevalFuture object, returned as a string scalar or character
vector.
Example: "144.213.5.7"
This property is read-only.
Identifier, returned as an integer scalar.
Data Types: double
This property is read-only.
Input arguments for the function, returned as a cell array.
When the scheduled function specified by the Function property
runs, it runs as fcn(X{:}), where X is the cell
array of input arguments specified by this property.
Example: {[1]}
Example: {[1,2], "string data", 13.2}
This property is read-only.
Number of arguments requested from the function, returned as an integer scalar.
The function specified by the Function property must return at
least as many arguments as returned by this property.
Data Types: double
This property is read-only.
Duration of the function ran on the server, returned as a duration scalar.
The duration is calculated by subtracting CreateDateTime from
now or DeleteDateTime.
This property is read-only.
Output arguments from running the function, returned as a cell array.
This property is an empty cell array if the FevalFuture object is
not finished running or the associated function finishes execution with an error. It
becomes non-empty when you successfully run fetchOutputs on the
FevalFuture object. The results are stored locally and
fetchOutputs deletes the results from the server. Subsequent calls
to fetchOutputs access this property rather than retrieving them from
the server again.
Example: {[3.14]}
Data Types: cell
Port number of the MATLAB
Production Server instance hosting the deployable archive that created the
FevalFuture object, returned as a positive scalar.
Example: 9920
Data Types: uint8 | uint16
Protocol used to make the request to MATLAB
Production Server, returned as "HTTP" or
"HTTPS".
Full URL of the request to MATLAB
Production Server, returned as a string scalar in the form
<protocol>://<host>:<port>/<path to request>.
Value of the Session-ID header from the server, if one exists, returned as a string scalar.
This property is read-only.
Current state of the future, returned as one of these members of the
AsyncState enumeration:
'Reading'—FevalFutureis being read by MATLAB Production Server and is not yet in the queue.'inQueue'—FevalFutureis queued, and the function associated with it is scheduled to run.'Processing'— Function associated with theFevalFutureis currently running.'Ready'— Function associated with theFevalFutureis finished running.'Error'— Function associated with theFevalFuturehas produced an error.'Cancelled'— Evaluation of the function associated with theFevalFuturehas been cancelled.'Deleted'— TheFevalFuturehas been deleted.'Unknown'— Function associated with theFevalFutureis in an unknown state.
This property is read-only.
List of terminal states, returned as one of these members of the
AsyncState enumeration:
'Ready'— Function associated with theFevalFutureis finished running.'Error'— Function associated with theFevalFuturehas produced an error.'Cancelled'— Evaluation of the function associated with theFevalFuturehas been cancelled.
Object Functions
cancel | Stop function running on MATLAB Production Server in the background |
fetchOutputs | Retrieve results from function running on MATLAB Production Server in the background |
wait | Wait for futures running on MATLAB Production Server to complete |
Version History
Introduced in R2026b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)