13

Boost.CoroutineBoost.Coroutine2之间的主要区别是什么?

4

2 回答 2

10

一些区别:

  • Boost.Coroutine2 需要 C++11
  • Boost.Coroutine 提供对称和非对称协程,Boost.Coroutine2 只提供非对称协程。
于 2016-05-20T20:53:38.300 回答
9
  • boost.coroutine2 是 boost.coroutine 的后续项目(boost.coroutine 很快就会被标记为 deprecated)
  • boost.coroutine2 使用来自 boost.context 的类 execution_context
  • boost.coroutine 是使用 boost.context 中已弃用的类似 C 的 fcontext-API 实现的
于 2016-06-13T09:19:02.047 回答