| 154 | } |
| 155 | |
| 156 | void discarded() |
| 157 | { |
| 158 | foreach (Future<T> future, futures) { |
| 159 | future.discard(); |
| 160 | } |
| 161 | |
| 162 | // NOTE: we discard the promise after we set discard on each of |
| 163 | // the futures so that there is a happens-before relationship that |
| 164 | // can be assumed by callers. |
| 165 | promise->discard(); |
| 166 | |
| 167 | terminate(this); |
| 168 | } |
| 169 | |
| 170 | void waited(const Future<T>& future) |
| 171 | { |