coroutine资源索引

coroutine (通常被译为“协作程序”或"共行程序“)是程序设计中一个非常重要的概念,通常可用于多任务协作处理、迭代器和管道中。它最早出现于”Design of a Separable . Transition -Diagram Compiler “这篇论文中,taocp (the art of computer programming)第一卷1.4.2节也对这个概念进行简单的讲解。Building Coroutines 用图示来说明coroutine的概念。c语言中实现coroutine有以下几种方法:

(1)Coroutines in C

(2)使用c标准库的setjmp和longjmp函数,例如:

Coroutines in less than 20 lines of standard C

(3)unix/linux等遵守posix规范的系统提供了getcontext, setcontext, makecontext and swapcontext ,可以用来实现coroutine

(4)其他一些coroutine库,例如:libtask ,libpcl ,libCoroutine ,coro ,libconcurrency ,libcoro

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值