| 3158 | } |
| 3159 | } |
| 3160 | } |
| 3161 | return cancelResult; |
| 3162 | } |
| 3163 | |
| 3164 | void AwaitTaskGroupWaitAllAwaiter::onTaskCompleted(void* object) |
| 3165 | { |
| 3166 | static_cast<AwaitTaskGroupWaitAllAwaiter*>(object)->onTaskCompleted(); |
| 3167 | } |
| 3168 | |
| 3169 | void AwaitTaskGroupWaitAllAwaiter::onTaskCompleted() |
| 3170 | { |
| 3171 | if (finished) |
| 3172 | { |
| 3173 | return; |
| 3174 | } |
| 3175 | |
| 3176 | completedTasks++; |
| 3177 | if (completedTasks == group.numTasks) |
| 3178 | { |
| 3179 | finish(operationResult ? collectResult() : operationResult); |