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.