wait
Wait for job to change state
Description
wait(
blocks execution in the client
session until the job identified by the object j
)j
reaches the
'finished'
state or fails. The 'finished'
state
occurs when all the job's tasks are finished processing on the workers.
Note
Simulink® models cannot run while a MATLAB® session is blocked by wait
. If you must run
Simulink from the MATLAB client while also running jobs, do not use
wait
wait(
blocks execution in the client session until the specified job object changes state to the
value of j
,state
)state
. Valid states to wait for are
"queued"
, "running"
, and
"finished"
.
If the object is currently or was previously in the specified state, MATLAB does not wait and the function returns immediately. For example, if you run
wait(j,"queued")
for a job already in the
"finished"
state, the function returns immediately.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2008a
See Also
pause
| resume
| wait (Future)
| wait (GPUDevice)
| parallel.Job