Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Jeff_Masselink
Beginner
19 Views

void task_group::run()

void task_group::run().

1) Since the function returns void, howan application knowsthe function successfully returned? Is there an exception thrown if something wrongin failure cases ?

2) The similar question, since the task_group::run is asynchrnized, for a task in a task group, how the application checks the status of the task, like when it is created, scheduled and run successfully?

Thanks!

0 Kudos
1 Reply
Kirill_R_Intel
Employee
19 Views

Hellp Jeff,

task_group::run() just allows the task group to start. It doesn't mean all the tasks begin execute simultaneously. Once we called run, we don't have info about task completion status, and even about task starting status because it's too early for this. The status can be seen only when we call wait() - it returns status and you can check for exceptions there also.
So the wait() method is the place to check status, not run().

Regards,
Kirill