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

Coroutines are computer program components that generalize subroutines for non-preemptive multitasking, by allowing execution to be suspended and resumed. Coroutines are well-suited for implementing familiar program components such as cooperative tasks, exceptions, event loops, iterators, infinite lists and pipes.

According to Donald Knuth, Melvin 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]

协程是计算机程序的一类组件,推广了协作式多任务子程序,允许执行被挂起与被恢复。相对子例程而言,协程更为一般和灵活,但在实践中使用没有子例程那样广泛。协程源自SimulaModula-2语言,但也有其他语言支持。协程更适合于用来实现彼此熟悉的程序组件,如协作式多任务异常处理事件循环迭代器无限列表管道

根据高德纳的说法, 马尔文·康威于1958年发明了术语coroutine并用于构建汇编程序[1] [2] 协程最初在1963年被提出。[2]

Implementations for C#

  • MindTouch Dream - The MindTouch Dream REST framework provides an implementation of coroutines based on the C# 2.0 iterator pattern
  • Caliburn - The Caliburn screen patterns framework for WPF uses C# 2.0 iterators to ease UI programming, particularly in asynchronous scenarios.
  • Power Threading Library - The Power Threading Library by Jeffrey Richter implements an AsyncEnumerator that provides simplified Asynchronous Programming Model using iterator-based coroutines.
  • The Unity game engine implements coroutines.
  • Servelat Pieces - The Servelat Pieces project by Yevhen Bobrov provides transparent asynchrony for Silverlight WCF services and ability to asynchronously call any synchronous method. The implementation is based on Caliburn's Coroutines iterator and C# iterator blocks.
  • [9] - The .NET 2.0+ Framework now provides semi-coroutine (generator) functionality through the iterator pattern and yield keyword.

C# 5.0 includes await syntax support.

Implementing Unity's Coroutines on Winforms and WPF Applications

最新文章

  1. CoreCLR源码探索(一) Object是什么
  2. ActionScript基本语法讲解
  3. sgu 105 Div 3
  4. SQL Server 系统时间
  5. 《Programming WPF》翻译 第3章 4.我们进行到哪里了?
  6. CBitmap,HBitmap,Bitmap区别及联系
  7. [HEOI2015]兔子与樱花
  8. QM3_Statistics Concepts and Market Returns
  9. 2、阿里云ECS发送邮件到腾讯企业邮箱(ECS默认不开启25端口)
  10. RK3399 友善NanoPC-T4开发板使用sysfs方法控制status LED状态灯-【申嵌视频-RK3399篇】
  11. TypeError: object() takes no parameters
  12. C#编码、解码与ASP.NET编码解码对应函数
  13. 大数据基础篇----jvm的知识点归纳-5个区和垃圾回收机制
  14. 【python基础】利用pandas处理Excel数据
  15. C#编译时,提示缺少NuGet包
  16. WebStorm 之 Cordova 环境搭建
  17. c++ 整数和字符串的转化
  18. XRP共识算法
  19. selenium 标签页切换
  20. Unity 游戏开发技巧集锦之创建透明的材质

热门文章

  1. ubuntu 使用MySQL Workbench 连接远程云服务器mysql
  2. 【转载】内联函数 —— C 中关键字 inline 用法解析
  3. Linux命令——procinfo
  4. leetcode-2-重复的DNA序列
  5. 【小顶堆的插入构造/遍历】PatL2-012. 关于堆的判断
  6. php中危险的木马函数-eval()函数
  7. SMT32 启动文件详细解说
  8. c语言数组越界的避免方法
  9. QPainter 提高绘制效率的方法
  10. selenium之python源码解读-webdriver继承关系