fetchNext
Retrieve next unread outputs from Future
array
Description
[
retrieves the linear index idx
,Y1,...,Ym
] = fetchNext(F
)idx
of the next unread
FevalFuture
object in the array F
that is finished,
and m
results from that Future
as
Y1,...,Ym
.
You can only use fetchNext
with FevalFuture
objects you create using parfeval
.
A
FevalFuture
is unread if itsRead
property isfalse
. IfF
has no unread elements, MATLAB® throws an error.A
FevalFuture
is finished if itsState
property is'finished'
. If no unread elements are in the'finished'
state, MATLAB first waits for an element ofF
to finish.
fetchNext
reads elements from F
in order of
completion. After fetchNext
retrieves the outputs from the next
unread Future
object in the array F
, MATLAB sets the Read
property of that
FevalFuture
to true
.
If fetchNext
reads an element from F
that
encounters an error, the function first sets the Read
property of the
Future
element to true. Then, fetchNext
throws an
error.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2013b