This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/49204] [C++0x] remaining issues in <future>
- 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, 02 Jan 2012 17:56:19 +0000
- Subject: [Bug libstdc++/49204] [C++0x] remaining issues in <future>
- Auto-submitted: auto-generated
- References: <bug-49204-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49204
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-01-02 17:56:19 UTC ---
(In reply to comment #2)
> We should also make std::async check the system load when deciding whether to
> run asynchronously or deferred. We should be able to reuse GNU Make's code for
> deciding whether to run a new job or not, see load_too_high() in job.c
It turns out that calling get_nprocs() (via
std::thread::hardware_concurrency()) and getloadavg() from several threads
concurrently is a really bad idea, so I'm working on a simple implementation
that just compares the number of active async jobs to the number of processors.