| 69 | } |
| 70 | |
| 71 | CallbackAfter PushChildAfter(int w) { |
| 72 | return [this, w](std::any token) { |
| 73 | const int* v = std::any_cast<int>(&token); |
| 74 | ASSERT_NE(v, nullptr); |
| 75 | // Mutex may be invalid and child is single-thread anyway |
| 76 | child_after_.push_back(*v + w); |
| 77 | }; |
| 78 | } |
| 79 | |
| 80 | void Reset() { |
| 81 | std::lock_guard<std::mutex> lock(mutex_); |