Cancel all pending futures.
| 164 | { |
| 165 | // Cancel all pending futures. |
| 166 | foreach (auto watcher, futureWatcherList) { |
| 167 | if (!watcher->isFinished()) |
| 168 | watcher->cancel(); |
| 169 | } |
| 170 | |
| 171 | // wait for futures to finish |
| 172 | foreach (auto watcher, futureWatcherList) { |