- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
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

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page