wait (FevalFuture)

Wait for futures to complete

Syntax

OK = wait(F)
OK = wait(F,STATE)
OK = wait(F,STATE,TIMEOUT)

Description

OK = wait(F) blocks execution until each of the array of futures F has reached the 'finished' state. OK is true if the wait completed successfully, and false if any of the futures was cancelled or failed execution.

OK = wait(F,STATE) blocks execution until the array of futures F has reached the state STATE. Valid values for STATE are 'running' or 'finished'.

OK = wait(F,STATE,TIMEOUT) blocks execution for a maximum of TIMEOUTseconds. OK is set false if TIMEOUT is exceeded before STATE is reached, or if any of the futures was cancelled or failed execution.

Introduced in R2013b

Was this topic helpful?