| 219 | Status final_status_; |
| 220 | |
| 221 | Status operator()() { |
| 222 | if (!barrier_->load()) { |
| 223 | SleepFor(1e-5); |
| 224 | // Note the TaskGroup should be kept alive by the fact this task |
| 225 | // is still running... |
| 226 | weak_group_ptr_.lock()->Append(*this); |
| 227 | } |
| 228 | return final_status_; |
| 229 | } |
| 230 | }; |
| 231 | |
| 232 | // Try to replicate subtle lifetime issues when destroying a TaskGroup |