摘要: 什么是coroutine?在C++里coroutine就是一个函数,但是这个函数可以有多个进入点(entry point),并且可以像线程一样挂起和唤醒。Wiki上有更精确的描述:“coroutines are computer program components that generalize subroutines to allow multiple entry points for suspending and resuming execution at certain locations.”。函数拥有了多个进入点的能力之后就可以在执行到某个点A的时候将控制权交给另外一个corouti 阅读全文
posted @ 2013-05-25 13:50 hugh lo 阅读(1460) 评论(0) 推荐(0)