码迷,mamicode.com
首页 > 其他好文 > 详细

Routine Subroutine Coroutine 子程序 协程

时间:2017-11-02 16:11:03      阅读:131      评论:0      收藏:0      [点我收藏+]

标签:except   oop   point   cert   ecif   time   inf   div   org   

 

https://en.wikipedia.org/wiki/Subroutine

In computer programming, a subroutine is a sequence of program instructions that perform a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed.

Subprograms may be defined within programs, or separately in libraries that can be used by multiple programs. In different programming languages, a subroutine may be called a procedure, a function, a routine, a method, or a subprogram. The generic term callable unit is sometimes used.[1]

 

 

Subroutines are special cases of ... coroutines.

https://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 tasksexceptionsevent loopsiteratorsinfinite lists and pipes.

According to Donald KnuthMelvin Conway coined the term coroutine in 1958 when he applied it to construction of an assembly program.[1] The first published explanation of the coroutine appeared later, in 1963.[2]

 

Routine Subroutine Coroutine 子程序 协程

标签:except   oop   point   cert   ecif   time   inf   div   org   

原文地址:http://www.cnblogs.com/yuanjiangw/p/7772302.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!