Home > Mobile >  Why the STD: : async no asynchronous real-time update QT GUI (based on QT Quick) BuKa meal? But the
Why the STD: : async no asynchronous real-time update QT GUI (based on QT Quick) BuKa meal? But the

Time:11-20

Don't want to achieve, based on QtConcurrent want to be able to use the standard library, STD: : thread there is no problem, but the STD: : async but can't do that, but the use of boost: : async can, is this why? Warrior, please grant instruction

CodePudding user response:

No code, can only guess, may be your call is not correct, the boost and STL may behavior is not the same as

Boost:
If this policy is specified together with other policies, to the as the when using a value of the policy launch: : async | launch: : deferred, implementations should defer invocation or the selection of the policy the when no more concurrency can be effectively exploited.

STL:
If both the STD: : launch: : async and STD: : launch: : deferred flags are set in the policy, it is up to the implementation been to perform asynchronous execution or lazy evaluation.
  •  Tags:  
  • Qt
  • Related