协程
其实呢 yield可以从协程(Coroutines)这个角度来看待,生成器就好像一个生产者,而所关联的那个迭代器就是一个消费者。
协同程序
...于全局解释器锁的存在,Ruby代码不会并行执行);此外,Fibers对延续机制(Continuations)进行了更新并将协同程序(Coroutines)引入到了Ruby中。
纤程
... 开源,zlib的那种无限制使用的license 纤程(Coroutines) 尾递归(tail recursion) ...
并发
... ### 引入 Importer ### 并发 Coroutines 要捕获异常,使用Object原型的try()方法. try()会捕获任何异常并返回,如果没有异常就返回nil. ...
Coroutines are computer program components that generalize subroutines for nonpreemptive multitasking, by allowing multiple entry points for suspending and resuming execution at certain locations. Coroutines are well-suited for implementing more familiar program components such as cooperative tasks, exceptions, event loop, iterators, infinite lists and pipes.According to Donald Knuth, the term coroutine was coined by Melvin Conway in 1958, after he applied it to construction of an assembly program. The first published explanation of the coroutine appeared later, in 1963.