nn::boss::Task::StartImmediate Member Functionnn::Result StartImmediate( void );
None.
Result values listed below. | Value | Description |
|---|---|
Result::IsSuccess |
Successfully issued instruction to start task immediately. |
ResultInvalidTaskId |
The task ID pointer is NULL or a zero-length string. |
ResultTaskNotExist |
The specified task ID was not found. Confirm whether it is registered yet. |
ResultIpcNotSessionInitialized |
The session has not been initialized. This result is returned if this function is called before the Initialize function. Always call the Initialize function first thing when you use the BOSS library. |
| A value other than the above. | Unexpected error (see boss_Result.h for error details). |
Gives an instruction to start the task immediately. This function must only be called after infrastructure connections are enabled.
Because this function allows you to run a task before its scheduled time, it is suitable for on-demand immediate execution of tasks that would normally run in the background. When you specify immediate execution of a task, you can run it at highest priority by interrupting other tasks that are running. This function differs from Start in that, if a task's execution time has already arrived and communications are interrupted, the task does not enter the "resume" state but instead returns an error for the task execution result.
Also note that if you want to execute the target task only once, you must set its execution count to 1. Setting it to a value greater than 1 will cause it to run in the background automatically like a normal task until its execution count reaches zero.
See the nn::ac::Connect function for information about how to enable infrastructure connections.
CONFIDENTIAL