Opened 12 years ago
Closed 12 years ago
#4414 closed Feature Requests (wontfix)
wait_for_all waits on futures on implicit specific order.
Reported by: | Owned by: | Anthony Williams | |
---|---|---|---|
Milestone: | Boost 1.44.0 | Component: | thread |
Version: | Boost 1.44.0 | Severity: | Problem |
Keywords: | Cc: |
Description
Either, the order in which futures must happen must be specified explicitly in the documentation, or, may be, a wait_for_all can be implemented via wait_for_any. For example, a range based wait_for_all:
template <typename FutureIterator> void wait_for_all(FutureIterator first, FutureIterator last) { for (;first != last; ++first) std::iter_swap(first, boost::wait_for_any(first, last)); }
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Component: | None → thread |
---|---|
Owner: | set to |
comment:3 by , 12 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
The function is documented to not return until all futures are ready. This is true.
The documentation doesn't specify what order the futures are waited for, so if your code relies on a specific order then your code is broken.
Note:
See TracTickets
for help on using tickets.
Why do you care what order it waits in?