Routine Subroutine Coroutine 子程序 协程

Posted rsapaper

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Routine Subroutine Coroutine 子程序 协程相关的知识,希望对你有一定的参考价值。

 

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 子程序 协程的主要内容,如果未能解决你的问题,请参考以下文章

fortran里面subroutine子程序不是不用声明吗?

OpenGL使用 subroutine 切换可编程管线

基于Qt的OpenGL可编程管线学习- 使用Subroutine绘制不同光照的模型

BADI:UJD_ROUTINE

void *(*routine)(void *) 在 C 中是啥意思? [复制]

什么是 LPTHREAD_START_ROUTINE?