This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libstdc++/51618] synchronous futures are slow


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51618

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-19 11:51:52 UTC ---
Could you expand on what you mean by "no attached synchronization"?

If a global future visible to all threads stores a deferred function then it
still needs synchronization to ensure only one thread can invoke the deferred
function and that other threads will wait for it to complete.

std::async is not meant to be the fastest or most flexible solution, it's meant
to be a simple way to exploit a limited amount of concurrency, without breaking
the Kona compromise.  Better solutions are suitable for TR2.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]