id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 8600,"wait_for_any hangs, if called with multiple copies of shared_future referencing same task",Martin Apel ,viboes,"The following small test program shows the problem: {{{ #include #include int calculate_the_answer_to_life_the_universe_and_everything() { return 42; } int main(int argc, char* argv[]) { boost::packaged_task pt(calculate_the_answer_to_life_the_universe_and_everything); boost::shared_future fi1 = boost::shared_future(pt.get_future()); boost::shared_future fi2 = fi1; boost::thread task(boost::move(pt)); // launch task on a thread boost::wait_for_any(fi1, fi2); std::cout << ""Wait for any returned\n""; return (0); } }}} This program hangs infinitely in the call to boost::wait_for_any. From the docs I would expect this to work, because it's allowed to copy shared_futures. If this is not allowed, a possibility would be needed, to find out, if two shared_futures point to the same task or not. Currently wait_for_any is unusable, if there are chances, that multiple shared_futures point to the same result.",Bugs,assigned,To Be Determined,thread,Boost 1.53.0,Problem,,,