不想基于QtConcurrent實作,希望能夠使用標準庫實作,std::thread沒有問題,但是std::async卻做不到,但是用boost::async卻可以,這是為什么?請大俠賜教
uj5u.com熱心網友回復:
沒有代碼,只能猜,可能你的呼叫不對,boost 和 stl 可能行為不一樣Boost:
If this policy is specified together with other policies, such as when using a policy value of launch::async | launch::deferred, implementations should defer invocation or the selection of the policy when no more concurrency can be effectively exploited.
STL:
If both the std::launch::async and std::launch::deferred flags are set in policy, it is up to the implementation whether to perform asynchronous execution or lazy evaluation.
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/10794.html
標籤:Qt
