2015年5月24日

Coroutines in C ——by Simon Tatham

摘要: http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html------------------------------上一篇文章协程代码的来龙去脉,值得一读。 阅读全文

posted @ 2015-05-24 18:51 lhonglwl 阅读(121) 评论(0) 推荐(0) 编辑

一段很精妙的类协程代码

摘要: #include typedef struct{ int i; int num; int state;} task;#define crBegin(state) \ switch (state) { case 0:#define crReturn(state, ret... 阅读全文

posted @ 2015-05-24 00:02 lhonglwl 阅读(154) 评论(0) 推荐(0) 编辑

导航