mardi 31 mars 2015

C++11 async - is management of optimal number of threads automatic?

If I have a task which spawns, say, 10,000 async threads using c++11 async<> / futures. Does async automatically manage the number of concurrent threads?


Specifically, if I have an 8 core machine, would my program spawn 10,000 thread or would it be smart enough to queue them up into batches of 8 (or whatever is ideal for my machine)?


Aucun commentaire:

Enregistrer un commentaire