[Bug libstdc++/57440] Memory usage with future and std containers
demonskull1 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue May 28 13:43:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57440
--- Comment #2 from DrD <demonskull1 at gmail dot com> ---
(In reply to Jonathan Wakely from comment #1)
> (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)
Oh! thank you very much for the tip!
More information about the Gcc-bugs
mailing list