Description
RTI_TASK_STATUS returns the current status of a submitted background tasks, and its results (if the task is complete).
It is a member of the RTI_TASK_xxx programs.
Syntax
Rslt = RTI_TASK_STATUS(taskID, results)
Parameters
The function has the following parameters:
Parameter | Description |
---|---|
taskID | The task ID returned from the RTI_TASK_SUBMIT call |
results | The results generated by the background task, if it is completed. |
Returns
The current status of the task.
Notes: RTI_TASK_STATUS will return the current status of the requested task. Possible return values include “SUBMITTED” (the task has been placed in the queue but is not yet processed), “IMMEDIATE” (the task has been submitted for immediate processing but has not yet been processed), “PROCESSING” (the task is currently in process), “COMPLETED” (the task is complete), and “ERROR” (an error was encountered). If the task status is COMPLETED, the return value of the task (invoked as a function) will be returned in the “results” parameter; if the status is ERROR, the “results” parameter will contain additional error information. If the status is either COMPLETED or ERROR, the task entry will be removed after the RTI_TASK_STATUS call (so additional calls to RTI_TASK_STATUS with the same taskID will return an error).
See Also
RTI_TASK_SUBMIT, RTI_TASK_STARTUP, RTI_TASK_SHUTDOWN, RTI_TASKMANAGER