This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/51618] synchronous futures are slow
- From: "redi at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 19 Dec 2011 11:51:52 +0000
- Subject: [Bug libstdc++/51618] synchronous futures are slow
- Auto-submitted: auto-generated
- References: <bug-51618-4@http.gcc.gnu.org/bugzilla/>
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.