| 166 | } |
| 167 | |
| 168 | void BoxedWineCondition::removeParentCondition(const std::shared_ptr<BoxedWineCondition>& parent) { |
| 169 | const std::lock_guard<std::mutex> lock(parentsMutex); |
| 170 | for (int i = 0; i < MAX_PARENTS; i++) { |
| 171 | std::shared_ptr<BoxedWineCondition> p = parents[i].lock(); |
| 172 | if (p == parent) { |
| 173 | parents[i].reset(); |
| 174 | parentCount--; |
| 175 | } |
| 176 | } |
| 177 | } |
| 178 | |
| 179 | U32 BoxedWineCondition::parentsCount() { |
| 180 | const std::lock_guard<std::mutex> lock(parentsMutex); |