| 236 | } |
| 237 | |
| 238 | void discarded() |
| 239 | { |
| 240 | foreach (Future<T> future, futures) { |
| 241 | future.discard(); |
| 242 | } |
| 243 | |
| 244 | // NOTE: we discard the promise after we set discard on each of |
| 245 | // the futures so that there is a happens-before relationship that |
| 246 | // can be assumed by callers. |
| 247 | promise->discard(); |
| 248 | |
| 249 | terminate(this); |
| 250 | } |
| 251 | |
| 252 | void waited(const Future<T>& future) |
| 253 | { |