Wait for job to change state
wait(
blocks execution in the client session until the job identified by the objectj
)j
reaches the'finished'
state or fails. The'finished'
state occurs when all the job’s tasks are finished processing on the workers.
Note
金宝app®models cannot run while a MATLAB®session is blocked bywait
. If you must run Simulink from the MATLAB client while also running jobs, do not usewait
wait(
blocks execution in the client session until the specified job object changes state to the value ofj
,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 runwait(j,"queued")
for a job already in the"finished"
state, the function returns immediately.