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++/49204] [C++0x] remaining issues in <future>


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.


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