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

android - questions about switching from C2DM to GCM -

c++ - rosrun via ssh doesnt start a node properly -

Error C2280 mutex in a class C++ -