c++ - Does std::async started with std::launch::async span not more that one thread per scope and block on function exit? -


reading article on async , future:

void fun() {     std::async(std::launch::async, []{ f(); }); // temporary's dtor waits f()     std::async(std::launch::async, []{ g(); }); // not start until f() completes } 

got impression if fun called block until g() executed. please tall me wrong , there reasonable tasks pool behind std::async logic?


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -