Hacker News new | ask | show | jobs
by alpatters 4985 days ago
Well, getting 1.7x speedup on a dual core box isn't so bad and makes some sense. Showing at least the context switching isn't crippling, if you can cope with the memory overhead.

Anthony William's book "C++ Concurrency in Action" gave me the impression that implementations of std::async would stop spawning new threads at some implementation defined limit based on harware concurrency levels. Instead, delay execution or switch to serial for extra tasks.

1 comments

This is apparently true for VS2012 + Win7, at least from my tests. On a quad-core machine the max numbers of threads spawned by std::async is 10.