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
Post a Comment