How do you start a concurrent task named 'driveTask'?

Enhance your programming skills with the RECF Programming Test. Features flashcards and multiple choice questions with hints and explanations. Prepare for success!

Multiple Choice

How do you start a concurrent task named 'driveTask'?

Explanation:
Starting a concurrent task means telling the scheduler to begin executing the work you’ve prepared. You’ve already created or prepared the driveTask, so you now need to hand it over to the scheduler to run. The function that does exactly this is the one that starts an existing task by receiving its identifier or control block. Calling that function with driveTask moves it from a waiting/ready state into running, so its code begins to execute. Init or setup functions are for preparing the task and resources, not for starting execution. A different name might start a task in some systems, but here the required action to begin running the task is to call startTask with the task’s handle.

Starting a concurrent task means telling the scheduler to begin executing the work you’ve prepared. You’ve already created or prepared the driveTask, so you now need to hand it over to the scheduler to run. The function that does exactly this is the one that starts an existing task by receiving its identifier or control block. Calling that function with driveTask moves it from a waiting/ready state into running, so its code begins to execute.

Init or setup functions are for preparing the task and resources, not for starting execution. A different name might start a task in some systems, but here the required action to begin running the task is to call startTask with the task’s handle.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy