[Bug libstdc++/57440] Memory usage with future and std containers
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue May 28 13:37:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57440
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to DrD from comment #0)
> // ... launch the threads
> vector<std::future<double> > values;
> for (uint w=0; w<nThreads; ++w) {
> values.push_back(std::async(TestFutures));
> }
One quick comment, without analysing the issue:
No threads are launched in your program. Currently GCC's std::async always
behaves as std::async(std::launch::deferred, ...) so to run in a new thread you
need to explicitly call std::async(std::launch::async, TestFutures)
More information about the Gcc-bugs
mailing list