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++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -