标签:com put sum new point sts oca int direct
zh.wikipedia.org/wiki/协程
与子例程一样,协程也是一种程序组件。相对子例程而言,协程更为一般和灵活,但在实践中使用没有子例程那样广泛。协程源自Simula和Modula-2语言,但也有其他语言支持。协程更适合于用来实现彼此熟悉的程序组件,如合作式多任务,迭代器,无限列表和管道。
en.wikipedia.org/wiki/Coroutine
Coroutines are computer-program components that generalize subroutines for non-preemptive multitasking, by allowing multiple entry points for suspending and resuming execution at certain locations. Coroutines are well-suited for implementing familiar program components such as cooperative tasks, exceptions, event loops, iterators, infinite lists and pipes.
Subroutines are special cases of ... coroutines.
yield方式转移执行权的协程之间不是调用者与被调用者的关系,而是彼此对称、平等的
标签:com put sum new point sts oca int direct
原文地址:http://www.cnblogs.com/yuanjiangw/p/7746527.html