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++/51617] [C++0x] async(f) isn't.


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

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-12-19 10:43:22 UTC ---
Yes, this was an intentional choice (as I described in message
c++std-lib-30840) to ensure the system doesn't get killed by a fork bomb, e.g.
writing a parallel sort algorithm using async which launches a new thread for
every partition. I tried it, it wasn't pretty :)

At some point I will use getloadavg() or equivalent functionality to check the
system load and decide whether to launch a new thread or not, until then the
safer choice is to require a user to explicitly request it (then it's the
user's fault if they fork bomb their machine!)


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