﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-巢穴-随笔分类-脚本语言</title><link>http://www.cppblog.com/ccl0326/category/15998.html</link><description>about:blank</description><language>zh-cn</language><lastBuildDate>Tue, 15 Feb 2011 03:14:15 GMT</lastBuildDate><pubDate>Tue, 15 Feb 2011 03:14:15 GMT</pubDate><ttl>60</ttl><item><title> 关于lua的coroutine</title><link>http://www.cppblog.com/ccl0326/archive/2011/02/15/140073.html</link><dc:creator>Vincent</dc:creator><author>Vincent</author><pubDate>Tue, 15 Feb 2011 03:01:00 GMT</pubDate><guid>http://www.cppblog.com/ccl0326/archive/2011/02/15/140073.html</guid><wfw:comment>http://www.cppblog.com/ccl0326/comments/140073.html</wfw:comment><comments>http://www.cppblog.com/ccl0326/archive/2011/02/15/140073.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/ccl0326/comments/commentRss/140073.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/ccl0326/services/trackbacks/140073.html</trackback:ping><description><![CDATA[本质是串行,没有同步开销<br>虽然在用户态下，但是还是需要维护coroutine的状态，<br>也就是也会拥有自己的上下文切换的开销<br>更像是用户态下实现的线程，但抢占式的线程不论切换粒度再大或再小，都会有不可预知的行为，所要做同步，而coroutine是协作式的任务，<br>由自己交把自己的权利交出去，同步问题自然不用考虑了<br>自己小记一下
<img src ="http://www.cppblog.com/ccl0326/aggbug/140073.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/ccl0326/" target="_blank">Vincent</a> 2011-02-15 11:01 <a href="http://www.cppblog.com/ccl0326/archive/2011/02/15/140073.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>